sendusing in smtp why?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • chamling

    sendusing in smtp why?

    Hi,
    I got Error "The "SendUsing" configuration value is invalid." while
    using following code.
    MailMessage sendinfo= new MailMessage();
    sendinfo.BodyFo rmat=MailFormat .Html;
    sendinfo.Body=" bodyvalue";
    sendinfo.To="em ailadd@mydomain ";
    sendinfo.From=" emailadd@mydoma in";
    sendinfo.Subjec t="Preview Newsletter";
    SmtpMail.Send(s endinfo);

    Therefore, I added a line.
    SmtpMail.SmtpSe rver="localhost ";
    It then gave me error "The server rejected one or more recipient
    addresses server response was: 550 5.7.1 Unable to relay for
    myemailaddress"

    I saw a few message threads saying that the email address has to be in
    same domain to get this to run and it already is.

    I have tested this code in 2 servers. It works at one even without
    even the smtpserver specifiation and it doesn't work on the other
    server no matter what I try. I have tried several methods
    e.g.CDO.Message () and non seem to work on this server. It has to be
    something with configuration. I dont understand. I have spent a lot of
    time on it.
    Any suggestion will be great.
    Thanks
    Dee
Working...