|Subject:||Re: Question on composing a message|
|Posted by:||Remy Lebeau (TeamB) (firstname.lastname@example.org)|
|Date:||Mon, 5 Jun 2006|
"Master Surfer" <mastersurfer…@web.de> wrote in message
> what do I do, if i want to send a message to 4 people, two
> have their postboxes on my self programmed server and two
> somewhere else.
The server they reside on doesn't really matter. SMTP servers treat
recipients on a per-address basis. You can send a message to whatever
server you normally use, and it is the responsibility of that server to then
figure out where to relay the message to. A single message can include
recipients on different servers. If any recipients are on servers that your
main server can't reach, or won't relay to, that server will tell your SMTP
client before the message data is ever transmitted. Depending on which
version of Indy you are using, one of two things will happen:
1) if you are using Indy 9, TIdSMTP.Send() will fail completely with an
exception if any recipients are rejected
2) if you are using Indy 10, the TIdSMTP.OnFailedRecipient event will be
triggered for each rejected recipient. The event handler has a VContinue
parameter that you can set to True/False as needed. Send() will throw an
exception only if all recipients are rejected.
> when i add the two with the postbox at my server in the
> recipients-list the next mail server would deliver the mail
> to them!
That will only happen if your server is not stripping off the local
addresses when relaying the message to the next server.
> who can I write all four recipients in the mail, so that everybody can
> see who got it, but tell the next mta to deliver it only to 2 user?!
That is a server issue, not a client issue. Just send your message normally
to all 4 recipients, and let the server work it out. If you wrote the
server yourself, then you need to update your code to handle relaying
> can i use the "ReceiptRecipient" property?
No. That property has nothing to do with this issue.
Question on composing a message posted by Master Surfer on Mon, 05 Jun 2006