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 IntelliDispatch { public partial class SendError : Form { public SendError(string errordetailssent) { InitializeComponent(); errordetails.Text = errordetailssent; } private void SendButton_Click(object sender, EventArgs e) { SmtpClient client = new SmtpClient(); client.Port = 25; client.Host = "mail.ocs-networks.com"; client.EnableSsl = false; client.Timeout = 10000; client.DeliveryMethod = SmtpDeliveryMethod.Network; client.UseDefaultCredentials = false; MailMessage mm = new MailMessage("noreply@intellidispatch.com", "cobrien@ocs-networks.com", "IntelliDispatch Error Notification", errordetails.Text); mm.BodyEncoding = UTF8Encoding.UTF8; mm.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure; client.Send(mm); this.Close(); } } }