Last post Apr 29, 2013 12:33 PM by thirumaran007
Apr 29, 2013 09:20 AM|myfred18|LINK
I have created a code snippet that send mail properly by using the proper credentials like username, password, port and hostname of gmail smtp. but it is not sending the mail if we configured using an iis in local host. can anyone can helpout me.
mailMessage.Subject = strSubject;
mailMessage.IsBodyHtml = true;
mailMessage.Body = strBody;
mailMessage.Priority = MailPriority.Normal;
SmtpClient client = new SmtpClient(strMailserver, intPort); // smtp.gmail.com,25
NetworkCredential info = new NetworkCredential(strUsername, strPassword);
client.DeliveryMethod = SmtpDeliveryMethod.Network;
client.Credentials = info;
In above code what should be the value has to be given for the mailserver and port, when we configured through iis. I have an IP address which has been configured in IIS SMTP without any mailing credentials. How can i send mail now.
Example IP Address : 192.168.xx.xxx
Note : This doesn't have any Mail Credentials but configure in IIS 7, in OS Version : WINDOWS SERVER 2008
Apr 29, 2013 12:33 PM|thirumaran007|LINK
did you includ your userid/password properly ?