When I created a second site on my WP Multi-site setup it had no SMTP config in the new mail plugin(SMTP Mailer). I tried to configure it by copy paste but short of opening up the db or retrieving it from the env var via copy paste I had no way of accessing the SMTP password. Meaning if it ever changed mail would not send. I tried to see if I could setup the config globally but an old discussion confirmed it wasn't possible.
I switched back to WP Mail SMTP and saw it couldn't be configured via the Network UI without the PRO version. But after some digging I confirmed Setting the config via wp_config.php variables works just fine.
define( 'WPMS_ON', true ); // True turns on the whole constants support and usage, false turns it off.
define( 'WPMS_MAIL_FROM', getenv('CLOUDRON_MAIL_FROM') );
define( 'WPMS_MAIL_FROM_FORCE', true ); // True turns it on, false turns it off.
//define( 'WPMS_MAIL_FROM_NAME', 'From Name' );
define( 'WPMS_MAIL_FROM_NAME_FORCE', true ); // True turns it on, false turns it off.
define( 'WPMS_MAILER', 'smtp' ); // Possible values: 'mail', 'smtpcom', 'sendinblue', 'mailgun', 'sendgrid', 'gmail', 'smtp'.
define( 'WPMS_SET_RETURN_PATH', true ); // Sets $phpmailer->Sender if true, relevant only for Other SMTP mailer.
define( 'WPMS_SMTP_HOST', getenv('CLOUDRON_MAIL_SMTP_SERVER')); // The SMTP mail host.
define( 'WPMS_SMTP_PORT', getenv('CLOUDRON_MAIL_SMTP_PORT') ); // The SMTP server port number.
define( 'WPMS_SSL', '' ); // Possible values '', 'ssl', 'tls' - note TLS is not STARTTLS.
define( 'WPMS_SMTP_AUTH', true ); // True turns it on, false turns it off.
define( 'WPMS_SMTP_USER', getenv('CLOUDRON_MAIL_SMTP_USERNAME') ); // SMTP authentication username, only used if WPMS_SMTP_AUTH is true.
define( 'WPMS_SMTP_PASS', getenv('CLOUDRON_MAIL_SMTP_PASSWORD') ); // SMTP authentication password, only used if WPMS_SMTP_AUTH is true.
define( 'WPMS_SMTP_AUTOTLS', true ); // True turns it on, false turns it off.
This config means everything is configured across all sites in the install and each site can individually set the"From Name".
This seems like a much better default for the multi-site setup. The only thing that's not ideal is it'd be nice to be able to allow sending from different from address, including different domains configured in cloudron. username and password doesn't have to change but allowing different from address would be nice.
@girish Just read why you switched the plugin to SMTP Mailer...is there a solution I haven't found that can be used with that plugin?