zendframework / zend-mail

Mail component from Zend Framework
BSD 3-Clause "New" or "Revised" License
96 stars 111 forks source link

When set -f option, no set -f option automatically #227

Open tzmfreedom opened 5 years ago

tzmfreedom commented 5 years ago

Zend\Mail\Transport\SendMail always append envelope-from parameter.
But I want to set any envelope-from.
In this PR, only when not set option -f, set -f option automatically. This means if I set -ffoo@example.com or -bs -ffoo@example.com, Zend\Mail\Transport\Sendmail doesn't set -f option.

glensc commented 5 years ago

without getting deeper to the actual changes, have some thoughts:

  1. seems weird to have a negative parameter. how about set positive parameter which is b default true, and can be set as false.
  2. maybe have a specific option (envelope related) rather generic "no override" as behavior could be different if want/want not to override some other parameter.
tzmfreedom commented 5 years ago

Thank you for you reply and advice !

I rethink, revise my code and changed this PR goal.

On this PR, only when not set option -f, set -f option automatically.
This means if I set -ffoo@example.com or -bs -ffoo@example.com, Transport\Sendmail doesn't set -f option.
So there is no negative parameter, no additional method.

glensc commented 5 years ago

you should update PR title as well. and the body is a bit hard to read as well.

weierophinney commented 4 years ago

This repository has been closed and moved to laminas/laminas-mail; a new issue has been opened at https://github.com/laminas/laminas-mail/issues/17.

weierophinney commented 4 years ago

This repository has been moved to laminas/laminas-mail. If you feel that this patch is still relevant, please re-open against that repository, and reference this issue. To re-open, we suggest the following workflow: