Sending Mail
-
System.Web.Mail.SmtpMail.Send ("senderID@domainName.com", "receiverID@domainName.com","Subject of the Mail", "Message Body"); I am using SmtpMail in the above manner for sending email. I gave my emailid as receiver address. Eventhough it is showing a success message, when I open my Inbox, it is not there. Why? Thanks in advance.
-
System.Web.Mail.SmtpMail.Send ("senderID@domainName.com", "receiverID@domainName.com","Subject of the Mail", "Message Body"); I am using SmtpMail in the above manner for sending email. I gave my emailid as receiver address. Eventhough it is showing a success message, when I open my Inbox, it is not there. Why? Thanks in advance.
Unless you are still using .NET 1.1, you should use the System.Net.Mail[^] classes instead. The
System.Web.Mail
classes are marked as obsolete in Framework v2.0+.Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush
-
System.Web.Mail.SmtpMail.Send ("senderID@domainName.com", "receiverID@domainName.com","Subject of the Mail", "Message Body"); I am using SmtpMail in the above manner for sending email. I gave my emailid as receiver address. Eventhough it is showing a success message, when I open my Inbox, it is not there. Why? Thanks in advance.
Adding to what Paul said - Your code use local SMTP to send mails. So if it is stopped or not configured correctly, your mails won't get delivered. Look in the
PickUp
directory or inBadMail
directory inMailRoot
folder. If mail sending failed, it will be moved to the bad mail directory.All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions