Manuel Lemos - 2011-11-08 01:04:16 - In reply to message 3 from ced
SMTP servers do no look at the message headers, so the Return-path headers and others are irrelevant. In the SMTP protocol, the address passed by the FROM command is also to where and bounced messages will go.
Keep in mind that the SMTP FROM command is totally unrelated to the From: header, so they may point to the same address or not. This is what allows bounces to go to an address different from the sender address set in the From: header.
Setting the Return-Path: header to your bounce address is a just a convention invented by me for the MIME message class. Coincidentally other e-mail classes also adopted it.
If you want the class to not set the Message-ID header automatically, just set the class variable auto_message_id to 0.
ced - 2011-11-09 12:49:02 - In reply to message 4 from Manuel Lemos
Just a question.
If I specify a return-path on the header, it will be send on the MAIL FROM.
Because your function SendMessageHeaders take it at line 713 :
if(!$this->smtp->MailFrom(count($return_path) ? Key($return_path) : Key($from)))
So I want my return path be : email@example.com
and the MAIL FROM : firstname.lastname@example.org
Manuel Lemos - 2011-11-11 06:09:47 - In reply to message 8 from ced
No, I think you are confused. The class works as intended. If you specify the Return-path header, the SMTP FROM command uses that. That command is the way to tell the SMTP server where the message should be returned in case it bounces.
The SMTP FROM command has nothing to do with the From: header. The class only uses the address in the From header if you do not specify the Return-Path: header.
In any case the From: header will always exhibit what you set it to regardless what was passed to the SMTP FROM command.