Skip to content

SendmailMailer: Impossible to set commandArgs #93

@KacerCZ

Description

@KacerCZ

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('test@example.com');

$mailer = new \Nette\Mail\SendmailMailer();
$mailer->commandArgs = '-finfo@example.com';
$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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions