A few years ago I wrote a component to send emails faster, track them and load balance them between mail servers.
The component has this features for sending emails:
- Allows you to add a list of mail servers that will use to load balance the emails
- If the email fails to be send, won't give you an exception, will keep trying for 24 hours on different servers on the cluster.
- If a mail server does not work, will remove it from the list.
- When the user opens the email, you'll get a callback on the page you specify.
This is a sample of how to use the component:
// Create an array of all mail servers, mail server clusters and IPs you want to use
ArrayList aList = new ArrayList();
// Use it the same way than MailMessage
FreeMail.BetterMailMessage oMessage = new FreeMail.BetterMailMessage();
oMessage.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure; oMessage.IsBodyHtml = false;
oMessage.Priority = MailPriority.High;
oMessage.Subject = "This is the subject";
oMessage.Body = TextBox2.Text;
MailAddress oFrom = new MailAddress("firstname.lastname@example.org","Your Name");
oMessage.From = oFrom;
// This is the main class, you can set Load Balancing
// Tracking Url to call back when the user opens the email
// You can use SSL or Smtp Authentication like SmtpClient class
FreeMail.FreeMail oMail = new FreeMail.FreeMail(aList);
oMail.LoadBalancing = true;
oMail.TrackingUrl = "http://codeproject.com/track.aspx";
Download the sample here
Download the component DLL