MailTo property holds email address of the recepient, as
it will be provided to 'RCPT
TO' command when message is sent to destination
server. This doesn't have to be same as 'To'
field used in email. Technically, once relay connects to
the server, communication goes like this:
220 weonlydo.com ESMTP; Fri, 15 Aug 2003
02:02:45 +0200
HELO weonlydo.com
250 weonlydo.com Hello weonlydo.com, pleased to meet
you
MAIL FROM:
kreso@weonlydo.com
250
<kreso@weonlydo.com>, Sender ok
RCPT TO: general@weonlydo.com
250 <general@weonlydo.com>, Recipient ok
DATA
354 Please start mail input.
this is a test
.
250 Mail queued for delivery.
quit
221 Closing connection. Good bye.
As you can see, line marked with red color is used from
MailTo property.
You may want to put MailTo value between < and >
characters, because some servers will reject the message if
email address does not contain them. So, if you set
Relay.MailTo =
"<joe@usa.net>"
server will accept it ok.
You can specify more than one recipient for the message. However,
in such cases wodSmtpServer will always find mail exchangers based
on first specified recipient! When connection with the server is
established, wodSmtpServer will send multiple RCPT TO commands, one
for each specified recipient in this property. If server rejects any
of these recipients, you will get an error! You should use multiple
recipients only when you are sure that remote server will accept the
message for each recipient (for example, if you use remote server as
your Smarthost server). This property allows multiple recipients
only to allow you to send same message to same server but to more
than one user, instead of creating multiple relays even message
always is delivered to same server. Important: in MailTo
property, multiple recipients are delimited by CRLF (VbCrLf) and not
by comma or semi-colon!