Vaccano
Vaccano

Reputation: 82291

Send an email using exchange server ONLY

I need to send an email in my C# project using my companies Exchange Server.

Because someone sent out thousands of Emails from my company using a self hosted server, any attempts to not use the company Exchange Server to send the email will be squished.

I imagine I am going to need to get an Active Directory user created to do this... but what code to use? How to do the sending?

Upvotes: 2

Views: 2379

Answers (2)

Sean Hunter
Sean Hunter

Reputation: 1051

You could use the System.Net.Mail classes to send the email via SMTP if that is enabled on your SMTP server. Alternatively you could use the webdav protocol to send the email via HttpRequests and HttpResponses. An example showing how to do this can be found here.

Upvotes: 0

SLaks
SLaks

Reputation: 887195

You can send email through Exchange using SMTP with .Net's SmtpClient class.
You will need a login for the server.

Upvotes: 2

Related Questions