External SMTP not working
-
I’ve encountered the following issue in the latest version of RegistrationMagic (v4.5.4.1). Some external SMTP server settings prevent emails from being sent.
After a long time trying to debug this, I found the cause. I thought I’d share it with everyone who may have the same issue. Hopefully it’ll get fixed soon.
The fault lies in how PHPMailer is configured by the plugin when you select sending via SMTP in RM’s Email Notifications settings. It uses the same value for the SMTP username and the “From” field. This means if the username is not a valid email address (in my case Amazon’s SES username is a string of alphanumeric characters), PHPMailer fails because the “From” address is invalid.
A workaround is to change line 801 in
wp-content/plugins/registrationmagic-premium-v4.5.4.1/includes/class_rm_utilities.php
from$phpmailer->From = $options->get_value_of('smtp_user_name');
to$phpmailer->From = $options->get_value_of('senders_email');
For the devs: Can you add a field in the SMTP settings to specify the “From” address or change the behaviour so it uses the value from
$options->get_value_of('senders_email');
by default?For the devs P.S. – I love your plugin! Keep it up!
- The topic ‘External SMTP not working’ is closed to new replies.