Dear experts I am sending mails in following way but when i use mail address other than gmail address in txtemail then it gets problem please give me one stop solution. in txtpass user have to give its correct password.
SmtpClient serverobj = new SmtpClient();
serverobj.Credentials = new NetworkCredential(txtemail.Text,txtepass.Text);
serverobj.Port = 25;
serverobj.Host = "smtp.gmail.com";
serverobj.EnableSsl = true;
MailMessage msgobj = new MailMessage();
msgobj.From = new MailAddress(txtemail.Text, "Click On Following Link To confirm Registration", System.Text.Encoding.UTF8);
msgobj.To.Add("[email protected]");
msgobj.Subject = ("Confirm your registration");
msgobj.Body = "http://localhost:1330/activationpage.aspx?username=" + txtuname.Text;
msgobj.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure;
serverobj.Send(msgobj);
Response.Write("We have send a link on your mail please Confirm your registration by clicking on it");
Loading
Suthish NairPosted Feb 3, 2011, 12:46 PM
Configuring other mail clients
Suthish NairPosted Feb 5, 2011, 11:52 AM
MB, update your profile with your correct name. No shortcuts please.
MBPosted Feb 5, 2011, 3:15 AM
If u r using gmail public smtp, then you need to use gmail credentials only, .
BTW, gmail uses port:587 to send email when using smtp.gmail.com
Hope this helps.
MB
vijayPosted Feb 5, 2011, 1:34 AM
check this below articles for sending mail........sending mail
Suthish NairPosted Feb 4, 2011, 2:36 PM
So other members can easily find the answers.
Bharat BhushanPosted Feb 3, 2011, 7:03 AM
http://www.codegain.com/articles/aspnet/email/how-to-send-email-using-aspnet.aspx