Saranjith Saranjith - 1 year ago 96
C# Question

Sending mail from Third party sites Programmically

How can i send mail from sites other than gmail, hotmail, rediffmail. Without any API provided. Is there provision to make this happen in any of programming languages. I think the domain i'm going to use does not have any captcha checks.
I also would like to attach a folder within.

Answer Source

If you are asking about other domain names, like your own domain then you can use below method:

Add using System.Net.Mail; then below in some event

MailMessage mail = new MailMessage();
 SmtpClient SmtpServer = new SmtpClient("");
                   mail.From = new MailAddress("");
                   mail.Subject = "New Email";
                   mail.Body = "add text here from controls";

                   SmtpServer.Port = 25;
                   SmtpServer.Credentials = new System.Net.NetworkCredential("", "passhere");
                   SmtpServer.EnableSsl = false;
                   MessageBox.Show("All Done");
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download