using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net.Mail;
namespace emailsender
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
try
{
string from = "(e-mail address removed)";
// string from = "(e-mail address removed)";
//string from = "(e-mail address removed)";
string to = "(e-mail address removed)";
MailAddress mailfrom = new MailAddress(from);
MailAddress mailto = new MailAddress(to);
MailMessage msg = new MailMessage();
msg.Subject = "test mail";
msg.Body = "hai from software";
msg.From = mailfrom;
msg.To.Add(mailto);
msg.Priority = MailPriority.High;
SmtpClient mail = new SmtpClient("smtp.mail.turnerandmiller.us", 25);
// SmtpClient mail = new SmtpClient("smtp.mail.gmail.com", 25);
// SmtpClient mail = new SmtpClient("smtp.gmail.com", 587);
// SmtpClient mail = new SmtpClient("smtp.mail.yahoo.com", 25);
//mail.EnableSsl = true;
mail.Credentials = new System.Net.NetworkCredential(from, "gorgeous");
mail.Send(msg);
MessageBox.Show("hai");
}
catch (Exception ex)
{
Console.WriteLine("InnerException is: {0}", ex.InnerException);
MessageBox.Show(ex.ToString());
}
}
}
}
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net.Mail;
namespace emailsender
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
try
{
string from = "(e-mail address removed)";
// string from = "(e-mail address removed)";
//string from = "(e-mail address removed)";
string to = "(e-mail address removed)";
MailAddress mailfrom = new MailAddress(from);
MailAddress mailto = new MailAddress(to);
MailMessage msg = new MailMessage();
msg.Subject = "test mail";
msg.Body = "hai from software";
msg.From = mailfrom;
msg.To.Add(mailto);
msg.Priority = MailPriority.High;
SmtpClient mail = new SmtpClient("smtp.mail.turnerandmiller.us", 25);
// SmtpClient mail = new SmtpClient("smtp.mail.gmail.com", 25);
// SmtpClient mail = new SmtpClient("smtp.gmail.com", 587);
// SmtpClient mail = new SmtpClient("smtp.mail.yahoo.com", 25);
//mail.EnableSsl = true;
mail.Credentials = new System.Net.NetworkCredential(from, "gorgeous");
mail.Send(msg);
MessageBox.Show("hai");
}
catch (Exception ex)
{
Console.WriteLine("InnerException is: {0}", ex.InnerException);
MessageBox.Show(ex.ToString());
}
}
}
}