ComponentPro UltimateMail

      Sending mail through IIS

      Language Filter: AllSend comments on this topic to ComponentPro

      It is very easy to send a mail message through IIS spool folder with UltimateMail component. All you need to do is calling the static Send methods that have the SmtpSendOptions parameter and set the property UseIisPickupDirectory to true. The following example illustrates how to do that.

      using System;
      using ComponentPro.Net.Mail;
      MailMessage msg = new MailMessage();
      msg.Subject = "Test Subject";
      msg.BodyText = "Test Content";
      Console.WriteLine("Sending a message through IIS spool folder...");
      SmtpSendOptions options = new SmtpSendOptions();
      options.UseIisPickupDirectory = true;
      Smtp.Send(msg, options);
      Console.WriteLine("Message sent...");