Ahoj. Mám kod na odesílání e-mailů, ale nějak nechce šlapat:
System.Net.Mail.MailMessage Message = new System.Net.Mail.MailMessage();
Message.From = System.Net.Mail.MailAddress(this.TextBox004.Text, this.TextBox001.Text + " " + this.TextBox002.Text);
Message.To = System.Net.Mail.MailAddress("[email protected]", "někdo");
Message.IsBodyHtml = true;
Message.Subject = this.TextBox003.Text;
Message.Body = this.TextBox005.Text;
System.Net.Mail.SmtpClient SmtpClient = new System.Net.Mail.SmtpClient();
SmtpClient.Port = 25;
SmtpClient.Host = "smtp.neco.cz";
SmtpClient.Send(Message);
Message.Dispose();
|