send mail via exchange server

Discussion in 'ASP .Net' started by =?Utf-8?B?dG9t?=, Aug 31, 2006.

  1. 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 = "";
    msg.To = "";
    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
    =?Utf-8?B?dG9t?=, Aug 31, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. RedEye
    Replies:
    2
    Views:
    3,274
    RedEye
    Nov 18, 2003
  2. =?Utf-8?B?ZmFoYWRvbWFu?=

    How to send an e-mail from asp .net using exchange server?

    =?Utf-8?B?ZmFoYWRvbWFu?=, Jul 26, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    4,031
    Landi
    Jul 26, 2005
  3. Bruce Hodge
    Replies:
    0
    Views:
    400
    Bruce Hodge
    Feb 15, 2006
  4. martin smith
    Replies:
    3
    Views:
    320
    Jeff Cochran
    Mar 21, 2005
  5. Y W Wong

    Login to MS Exchange to send e-mail

    Y W Wong, May 27, 2004, in forum: Perl Misc
    Replies:
    15
    Views:
    227
    Y W Wong
    May 31, 2004
Loading...

Share This Page