SMTP relay in case if message was sent to more the - WeOnlyDo Discussion board

SMTP relay in case if message was sent to more the (wodSmtpServer / wodPop3Server / wodImapServer)

by bkv, Friday, April 20, 2012, 00:31 (4248 days ago)

What is the best approach for message relay if it was sent to more than one recipient?
In you sample № 4. Only relays received messages you are using MailReceived event like:

Private Sub wodSmtpServer1_MailReceived(ByVal User As WODSMTPSERVERCOMLib.ISmtpUser, Action As WODSMTPSERVERCOMLib.SmtpActions)
PrintList *** Mail received from & User.HostName & ! Contents follows:
PrintList User.Message.Body
PrintList *** Adding message to be relayed to & User.Message.MailTo
wodSmtpServer1.Relays.Add User.Message
End Sub

But MailReceived event is raised only once, for all recipients, and message will be relayed to last recipient which is saved in User.Message.MailTo property.

How to relay to all recipients?

Thanks in advance.

Complete thread: