The Mailing_OnAcceptMail event occurs when a mail is about to be received. The mail message can be accessed using the intrinsic Mail object.
Sub Mailing_OnAcceptMail(Accept)
. . .
End Sub
Sub Mailing_OnAcceptMail(Accept)
If Mail.Receivers(0) = "sales@emilltest.com"
Then
Accept = True
End If
End Sub
When accessing a POP3 queue, the Mail
Object will only be initialized with the mail header, the Contents
collection will always be empty.
If the message is not accepted, the Accept variable should never be set to
False, it should be left unmodified.