Sending email from within a WebService

Discussion in 'ASP .Net' started by Joe, Sep 27, 2005.

  1. Joe

    Joe Guest

    (sorry for the dual post here and the webservice NG. I meant to send to both
    at the same time)

    I have a method which sends email to & from a specific account. All was
    working fine until the server was upgraded to an AD/DNS server. Now the
    email never goes through.

    I can run the same code from an exe and it works fine.

    MailMessage mail = new MailMessage();

    mail.Body = msg;
    mail.From = emailfrom;
    mail.To = emailto;
    mail.Subject = "Test.";
    mail.Fields["http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"]
    = 2;
    mail.Fields["http://schemas.microsoft.com/cdo/configuration/smtpserver"]
    = "mail.mydomain.com";
    mail.Fields["http://schemas.microsoft.com/cdo/configuration/smtpserverport"]
    = 25;
    mail.Fields["http://schemas.microsoft.com/cdo/configuration/sendusername"]
    = "";
    mail.Fields["http://schemas.microsoft.com/cdo/configuration/sendpassword"]
    = "******";

    SmtpMail.SmtpServer = "mail.mydomain.com";
    SmtpMail.Send(mail);

    Does the service need to be granted a certain permission?
     
    Joe, Sep 27, 2005
    #1
    1. Advertising

  2. Joe

    Mark Rae Guest

    "Joe" <J_no_spam@_no_spam_Fishinbrain.com> wrote in message
    news:...

    > I have a method which sends email to & from a specific account. All was
    > working fine until the server was upgraded to an AD/DNS server. Now the
    > email never goes through.


    http://www.systemwebmail.com/
     
    Mark Rae, Sep 27, 2005
    #2
    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. Luke
    Replies:
    2
    Views:
    4,731
    Nigel Wade
    Mar 15, 2007
  2. rote
    Replies:
    8
    Views:
    778
  3. Joe

    Sending email from within a web service

    Joe, Sep 27, 2005, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    120
  4. René Preußler

    Asynchronous Call of WebService method within a WebService

    René Preußler, Oct 29, 2008, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    199
    René Preußler
    Oct 29, 2008
  5. Nathan Sokalski

    Sending an email from within ASP

    Nathan Sokalski, Jun 5, 2004, in forum: ASP General
    Replies:
    4
    Views:
    137
    Steven Burn
    Jun 7, 2004
Loading...

Share This Page