Click here to Skip to main content
15,915,975 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Im trying to send email to an account in c# programmtically.It gives no errors but finally the mail is no received when i check the inbox;
C#
System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage();
                                   mail.To.Add("hari.prasad@fnu.ac.fj");
                                   mail.Subject = "Put a subject here";
                                   mail.From = new System.Net.Mail.MailAddress("hari.prasad@fnu.ac.fj");
                                   mail.Body = "Put your message here";
                                   System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("mail.fnu.local");
                                   smtp.Send(mail);

any ideas as to why is not working out or what do i need to improve to get it working

Thanks
Posted
Updated 17-Oct-12 17:53pm
v2
Comments
Sergey Alexandrovich Kryukov 17-Oct-12 19:27pm    
Could you or anyone explain to me what "sending e-mail not programmatically" would be? :-)
--SA
[no name] 17-Oct-12 19:31pm    
Carrier pigeon? :-)
Sergey Alexandrovich Kryukov 17-Oct-12 19:39pm    
Do you mean, micro-USB on a leg, or what? Please read this:

http://tools.ietf.org/rfc/rfc1149.txt
http://tools.ietf.org/rfc/rfc2549.txt

Those are real official RFCs. Do you know the tradition of 1st of April RFCs?
--SA

1 solution

Are you missing the smtp login info?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900