Home » SharepointRSS

Send a email from abc@yahoo.com to xyz@gmail.com

Hi
     i have used system.net.mailmessage to do this.

But i dont get this working.I now that i need to change some data in web.config file.Can some one help me out with this ??

This is my code :

 MailMessage mm=new MailMessage("srp_oucse@yahoo.com","pauljason89442@gmail.com","Hello This is your password",pass);
        SmtpClient cl = new SmtpClient();
        cl.Host = ConfigurationManager.AppSettings["SMTP"];
        cl.Send(mm);

This is what i have changed in web.config file

 <appSettings>
    <add key="SMTP" value="mail.site.com"/>
  </appSettings>
 

mail.site.com is my local smtp server to which i tried to  ping and it is working too.

Thanks,
Paul.
      
 

3 Answers Found

 

Answer 1

First thing I would check is the SMTP mail  server log or BadMail folder. The SMTP server  log should show if the mail is actually arriving at the server and then the reason why it was rejected or failed.
 

Answer 2

First thing I would check is the SMTP mail  server log or BadMail folder. The SMTP server  log should show if the mail is actually arriving at the mpg server and then the reason why it was rejected or failed.
Internet Alarm Monitoring web  sites developed in ASP.Net

Maybe it is because the transport protocols they used are not the same. Suggest you to check if what yahoo used is SMTP?
 

Answer 3

i am som sirdharth roy.male 25.from kolkata.languages known bengali,hindi,english nationality.indian like to makes friends to roam one place toanother . email  id roy.som2007@gmail.com somsidharthroy@gmail.com persuing bba first year
 
 
 

<< Previous      Next >>


Microsoft   |   Windows   |   Visual Studio   |   Follow us on Twitter