I have a problem..and I could really need some help..
I am trying to send email from localhost...
I am using the following code
System.Net.Mail.MailMessage obj = new System.Net.Mail.MailMessage(); System.Net.Mail.MailAddress Toaddress = new System.Net.Mail.MailAddress("myReciever@hotmail.com"); System.Net.Mail.MailAddress fromAddress = new System.Net.Mail.MailAddress("myFrom@hotmail.com", "Sender"); obj.To.Add(Toaddress ); obj.From = fromAddress; obj.Subject = "trial mail"; obj.Body = "hello from localhost this is me"; obj.IsBodyHtml = true; SmtpClient client = new SmtpClient(); client.Host = "localhost"; client.Port = 25; client.Send(obj);
and I configured iis and smtp server to work...[added 127.0.0.1 ip to smtp properties/access tab>relay widow]
but I got no exception and yet NOTHING is sent...
what have i missed???
This post has been edited by JackOfAllTrades: 20 March 2010 - 08:01 AM
Reason for edit:: Added code tags. PLEASE!!! [code]...POST YOUR CODE IN HERE...[/code]