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 NairRank #92 · 22.8K reputationPosted Feb 3, 2011, 7:46 AM EST
Configuring other mail clients
Bharat Bhushan177 reputationPosted Feb 3, 2011, 2:03 AM EST
http://www.codegain.com/articles/aspnet/email/how-to-send-email-using-aspnet.aspx
Suthish NairRank #92 · 22.8K reputationPosted Feb 4, 2011, 9:36 AM EST
So other members can easily find the answers.
vijay172 reputationPosted Feb 4, 2011, 8:34 PM EST
check this below articles for sending mail........sending mail
MB3 reputationPosted Feb 4, 2011, 10:15 PM EST
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
Suthish NairRank #92 · 22.8K reputationPosted Feb 5, 2011, 6:52 AM EST
MB, update your profile with your correct name. No shortcuts please.