SmtpSubmittingMessageToPickupFolder Event
Occurs when the message is about to be saved into MailBee.NET Queue or IIS SMTP pickup folder.

Namespace: MailBee.SmtpMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax
public event SmtpSubmittingMessageToPickupFolderEventHandler SubmittingMessageToPickupFolder

Value

Type: MailBee.SmtpMailSmtpSubmittingMessageToPickupFolderEventHandler
Remarks

The developer can typically use this event for the following purposes:

  • Control whether particular messages should be skipped (not saved to the pickup folder). This can be useful when performing mail merge tasks. To make the message be skipped, set SubmitIt to false.
  • Fine-tune messages before they get saved to the pickup folder. This is also useful in mail merge tasks if the developer wants to perform some actions on the messages which had already been merged. You can change properties of the mail message itself (returned by MailMessage property), change ActualSenderEmail or ActualRecipients.
  • Change the pickup folder name or specify your own filename of the message file to be saved. This is useful if there is more than one pickup folder. Set Filename or PickupFolderName properties for this.

Note Note
If you changed the message sender or recipients via modification of the e-mail message itself (MailMessage property), you should also update ActualSenderEmail or ActualRecipients as well (for instance, set them to a null reference (Nothing in Visual Basic) to tell MailBee to grab these values from MailMessage property. Alternatively, if you only changed ActualSenderEmail or ActualRecipients, the corresponding message headers won't be changed (the message will be sent from or to addresses different from those specified in the message headers).
Examples
The example is available at SubmitJobsToPickupFolder(String, Boolean) topic.
See Also