Code:
System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage();
message.To.Add("evulbalangaw@gmail.com");
message.Subject = "This is the Subject line";
message.From = new System.Net.Mail.MailAddress("From@online.gnu.com");
message.Body = "This is the message body";
System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("smtpServer");
smtp.Send(message);
I got the code fragment above from googling.
How would I know my smtpServer?
I tried using gmail's smtp directly but it gave me this error
Code:
Service not available, closing transmission channel. The server response was: Cannot connect to SMTP server 216.239.59.109 (216.239.59.109:25), connect error 10060
If you would use XAMPP, how do you configure the smtp and know the server address of the smtp? or maybe in general?