send mail via exchange server

G

Guest

Hi,

What's the way to configure a web app and exchange server to allow the web
app to send mails via an existing exchange mailbox?

The question is :
- Do I need to create a windows account and setup the webapp to run under
that account
- Allow the windows account to send mails on behalf of the exchange email
account of my choice

Or is there another better way?

My code is as follows :

System.Web.Mail.MailMessage msg = new System.Web.Mail.MailMessage();
msg.BodyFormat = System.Web.Mail.MailFormat.Html;
msg.From = "(e-mail address removed)";
msg.To = "(e-mail address removed)";
msg.Subject = "subject";
msg.Body = "<html><body>"bodytext</body></html>";

System.Web.Mail.SmtpMail.SmtpServer = "mail.mydomain.com";
System.Web.Mail.SmtpMail.Send(msg);



Thanks,
Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top