This post has been edited by modi123_1: 08 February 2012 - 10:38 PM
Reason for edit:: removed excessive quote
Sending e-mail messages using C# How to send e-mail messages using C# and WinForms.
#31
Posted 08 February 2012 - 08:12 PM
i kindly request you to tell all the sample parameters to be entered in the application for gmail or ymail or any mail server to send a email
#32
Posted 08 February 2012 - 08:18 PM
i have used sendserver:smtp.gmail.com serverport:2525 from:mymail id to:frenmail id uname:my mail id pasword: mailid password
I am getting an error mail sending failed.Please help me this code is very useful in my project.
I am getting an error mail sending failed.Please help me this code is very useful in my project.
#33
Posted 09 February 2012 - 05:57 PM
sumanthkumarch, on 08 February 2012 - 08:18 PM, said:
i have used sendserver:smtp.gmail.com serverport:2525 from:mymail id to:frenmail id uname:my mail id pasword: mailid password
I am getting an error mail sending failed.Please help me this code is very useful in my project.
I am getting an error mail sending failed.Please help me this code is very useful in my project.
Try smtpserverport:587 i write some code maybe will help you... i'm not understanding what exactly are you looking for
Hope i help you
MailMessage mail = new MailMessage();
SmtpClient SmtpServer = new SmtpClient("smtp.gmail.com");
mail.From = new MailAddress("email@gmail.com");
mail.To.Add("email@smth.smth");
mail.Subject = "Name of subject"
mail.Body = "mail with attachment";
SmtpServer.Port = 587;
SmtpServer.Credentials = new System.Net.NetworkCredential("email@gmail.com", "paswword");
#34
Posted 19 March 2012 - 05:06 AM
sumanthkumarch, on 08 February 2012 - 08:18 PM, said:
i have used sendserver:smtp.gmail.com serverport:2525 from:mymail id to:frenmail id uname:my mail id pasword: mailid password
I am getting an error mail sending failed.Please help me this code is very useful in my project.
I am getting an error mail sending failed.Please help me this code is very useful in my project.
Like Guest_Ed mentioned
sendserver = smtp.gmail.com // sets the server you're sending from to gmail
serverPort = 587 // the port used for gmail
and then you must set Enablessl to true, to activate SecureSocketlayer(SSL)
i.e. if you just want to send to from gmail server you can use:
client.Host = "smtp.gmail.com";
client.Port = 587;
client.EnableSsl = true;
or just type in:
client.EnableSsl = true; // in your button1, before you send the msg via client.Send(message);
|
|





MultiQuote


|