Problem/Motivation
The default swiftmailer config is to use sendmail with the bs option.
Stand-alone SMTP server mode. Read SMTP commands from standard input, and write responses to standard output. In stand-alone SMTP server mode, mail relaying and other access
controls are disabled by default. To enable them, run the process as the mail_owner user.
This mode of operation is implemented by running the smtpd(8) daemon.
The issue is that this mode isn't allowed on some more secure hosting providers (such as Platform.sh). Instead they will have their PHP settings configured to use the t option.
Extract recipients from message headers. These are added to any recipients specified on the command line.<
This is also indicated in an issue open for Swiftmailer itself which will probably not get fixed: https://www.drupal.org/project/swiftmailer/issues/3174215#comment-13845855
Steps to reproduce
Install Open Social on a server that has sendmail_path configured to /usr/sbin/sendmail -t -i in their php.ini and try to send an email.
Proposed resolution
Adjust the social_swiftmail_install hook to update the sendmail_mode in the swiftmailer.transport config based on the PHP settings. This ensures that the t mode is properly used on supported platforms so that emailing in Open Social works out of the box.
Comments
Comment #2
kingdutchhttps://github.com/goalgorilla/open_social/pull/2724
Comment #3
ronaldtebrake commentedComment #4
ronaldtebrake commentedWill be only on new installs in 10.3.x / 11.0.x