Help with Sending Emails
i wrote a program that's supposed to me Like a mailer
it always "Failed ! " .
public partial class Form1 : Form
private void btn_Send_Click(object sender, EventArgs e)
MailAddress from = new MailAddress(txtFrom.Text);
MailAddress to = new MailAddress(txtTo.Text);
MailMessage mMsg = new MailMessage();
mMsg.From = from;
mMsg.Subject = txtSubject.Text;
mMsg.Body = txtBody.Text;
SmtpClient smtp = new SmtpClient("127.0.0.1");
MessageBox.Show("Failed ! ");
The Project is here :
so any ideas ?
You should check what the exception message is.
is 127.0.0.1 a valid SmtpClient?
you do know you have to run one on your pc to make it work, right? :-)
i've tried with it and it was all about the SmptClient .
thanx nvoigt & ShadowBeast .
it's now working : )