• Resolved wprun

    (@wordpressrun)


    When I receive email notifications, the FROM address is the same as the TO address.

    Is there a way to update the FROM email address for notifications?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • I don’t think MainWP has a setting for this; I think it uses the WordPress’s settings.

    Fortunately, WordPress allows you set the FROM and use SMTP using the phpmailer_init action in your child theme’s functions.php:

    
    add_action('phpmailer_init', 'sendMailViaSMTP');
    function sendMailViaSMTP($phpmailer) 
    {
    	$phpmailer->isSMTP();     
    	$phpmailer->Host = 'yourmailhost';
    	// Force it to use Username and Password to authenticate
    	$phpmailer->SMTPAuth = true;
    	$phpmailer->Port = 587;
    	$phpmailer->Username = '[email protected]';
    	$phpmailer->Password = 'yoursenderpassword';
    
    	// Additional settings…
    	// Choose SSL or TLS, if necessary for your server
    	$phpmailer->SMTPSecure = "tls";
    	$phpmailer->From = "[email protected]";
    	$phpmailer->FromName = "Your From Name";
    }
    

    What you’ll need to do is go through and change all the settings to those applicable to your server, and all your mail from MainWP will use these settings and send mail via SMTP, which you should be doing, anyway.

    Plugin Support Bojan Katusic

    (@bojankatusic)

    Hi,

    The answer provided by @linux4me2 is correct.

    I’m marking it as resolved.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Notifications From Address’ is closed to new replies.