Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SendmailMailer: Impossible to set commandArgs #93

Closed
KacerCZ opened this issue Jun 7, 2023 · 1 comment
Closed

SendmailMailer: Impossible to set commandArgs #93

KacerCZ opened this issue Jun 7, 2023 · 1 comment

Comments

@KacerCZ
Copy link

KacerCZ commented Jun 7, 2023

Version: 4.0.0

Bug Description

Commit 0e236e4 breaks sending mails with set "From" when SendmailMailer::$commandArgs is also set.
In that case function mail() is invoked with 6 parameters instead of expected 5 parameters.

Steps To Reproduce

$mail = new \Nette\Mail\Message();
$mail->setFrom('[email protected]');

$mailer = new \Nette\Mail\SendmailMailer();
$mailer->commandArgs = '[email protected]';
$mailer->send($mail);

Produces ArgumentCountError "mail() expects at most 5 arguments, 6 given".

Expected Behavior

Function mail() is successfully invoked.

Possible Solution

Command arguments from mailer must be concatenated with value from message.

@KacerCZ
Copy link
Author

KacerCZ commented Jun 7, 2023

May be worth considering how command line argument can be handled when it is already present in commandArgs as presented in #78.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant