0

we are using symfony/mailer in our project and i was wondering how i can configure the sendmail command with custom paramters. i found alot of content referencing to swiftmailer but we do not use that on this project.

we use:

symfony/mailer                           v4.4.7             Symfony Mailer Component

and i cannot find the configuration for the sendmail command or how that would be configured. we have to use a specific command for that:

/usr/sbin/sendmail -oi -t

how would the configuration of symfony/mailer look like to use that specific command?

we cannot use the default

/usr/sbin/sendmail -bs

because thats no option for our customer in this case...

help is much appreciated

EDIT: we just patched the core for our requirements on that specific project. i leave the question unresolved because their might be a better solution to that?

netzding
  • 772
  • 4
  • 21
  • 1
    you can probably override the defaults in your services.yaml by setting the parameters given to [SendmailTransport](https://github.com/symfony/symfony/blob/5.1/src/Symfony/Component/Mailer/Transport/SendmailTransport.php) ... and that might already be enough. – Jakumi Jul 10 '20 at 09:48
  • or maybe command https://symfony.com/doc/current/reference/configuration/swiftmailer.html#command – Jakumi Jul 10 '20 at 09:54
  • ye thats a feature for the "old" swiftmailer which we can not use. seems like it was a conscious decision to not make the command configurable within symfony/mailer because its actually a bad approach to not use -bs. – netzding Jul 10 '20 at 09:57

1 Answers1

0

SymfonyMailer uses the php.ini configuration, so try again with this:

sendmail_path = /usr/sbin/sendmail -oi -t
CasualBen
  • 829
  • 8
  • 22