-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Add ability to set SMTP envelope addresses #6570
Conversation
@ameir thanks for the contribution! A couple of things are still missing though:
|
/** | ||
* @var string | ||
*/ | ||
protected $from = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
= null
is not required in php
Thanks, @Ocramius! I'll work on some test cases and update this PR in a bit. |
/** | ||
* Get RCPT TO | ||
* | ||
* @return string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
string|null
This PR is still requiring tests before being mergeable |
Ping @ameir — I'd love to merge this for 2.4, but we need tests for the new functionality. Would you be able to do that in the next 2 weeks? |
@weierophinney I'll see if I can find time to knock this out in the next few days. My apologies for the delays; my schedule has been hectic. I have a number of other changes to perform PRs against as well (https://github.com/ameir/zf2/tree/mail-improvements), but they'll also need tests. |
@weierophinney @Ocramius I wrote tests and updated the code accordingly. I had to reintroduce the setters and getters due to a separate test failing that checked for existence of those. I then updated the code to use the setters/getters. Let me know if this needs further modification. |
Add ability to set SMTP envelope addresses
Incorporated feedback from @Ocramius and merged to develop for release with 2.4. |
…nvelope Add ability to set SMTP envelope addresses
I am working on a program that is called from a mail server, and re-injects the message back into the mail queue to be sent to multiple recipients (using a Postfix content filter). The problem is that this library forms the RCPT TO: information from the message headers, which in this case, will not work (the goal is for the message to arrive untouched). There should be an option to pass SMTP-level message options to the transport to handle situations like this.
I currently have something like the following:
This pull request will allow you to do: