Title: Cannot install 4.6, &#8220;phpmailerException&#8221; error
Last modified: September 2, 2016

---

# Cannot install 4.6, “phpmailerException” error

 *  [bg17aw](https://wordpress.org/support/users/bg17aw/)
 * (@bg17aw)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/cannot-install-4-6-phpmailerexception-error/)
 * This is for a new install, so it may be a WP core bug?
 *     ```
        Fatal error: Uncaught exception 'phpmailerException' with message 'Invalid address: wordpress@sitename.com' in C:\wamp\www\wp_test1\wp-includes\class-phpmailer.php on line 946
   
       ( ! ) phpmailerException: Invalid address: wordpress@wp_test1.com in C:\wamp\www\wp_test1\wp-includes\class-phpmailer.php on line 946
       ```
   
 * I never had an error like this when setting up a new install before.
 * What I tried:
    – downloaded and installed successfully WP 4.2. This seem to enforce
   the idea of a bug in the 4.6 installation – upgraded 4.2 to 4.6 successfully.
   Strange. Any help would be appreciated
    -  This topic was modified 9 years, 9 months ago by [bg17aw](https://wordpress.org/support/users/bg17aw/).
      Reason: more info
    -  This topic was modified 9 years, 9 months ago by [bg17aw](https://wordpress.org/support/users/bg17aw/).
      Reason: more info

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [9 years, 9 months ago](https://wordpress.org/support/topic/cannot-install-4-6-phpmailerexception-error/#post-7722056)
 * I suspect there’s something off about your PHP setup. Can you create a `phpinfo.
   php` file with this in it?
 * `<?php phpinfo(); ?>`
 * And share that URL if possible? Don’t paste that output here, the forums will
   just mung it all up if you do.
 *  Thread Starter [bg17aw](https://wordpress.org/support/users/bg17aw/)
 * (@bg17aw)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/cannot-install-4-6-phpmailerexception-error/#post-7722207)
 * Hi Jan,
    I am testing on WAMP, but here is the phpinfo output: [https://jsfiddle.net/ok94mfkL/](https://jsfiddle.net/ok94mfkL/)
 * What are you looking for in there? Hard to believe there is something wrong there,
   but if you do notice something, let me know.
 * Like I said, older versions of WP install just fine.
    Thanks
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [9 years, 9 months ago](https://wordpress.org/support/topic/cannot-install-4-6-phpmailerexception-error/#post-7722546)
 * Looks like you are running `Apache/2.2.22 (Win64) PHP/5.4.3`. The Apache2 part
   is fine but WordPress needs PHP 5.6 or later to work properly.
 * [https://wordpress.org/about/requirements/](https://wordpress.org/about/requirements/)
 * Can you update your WAMP to use PHP 5.6? PHP 7 works well if you can use that.
 *  Thread Starter [bg17aw](https://wordpress.org/support/users/bg17aw/)
 * (@bg17aw)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/cannot-install-4-6-phpmailerexception-error/#post-7722644)
 * That’s not actually correct, WP doesn’t require PHP 5.6, but PHP 5.2.4 (as per
   your link).
 * I don’t think this is the issue.
 *  [KeyMaker](https://wordpress.org/support/users/keymakerproductions/)
 * (@keymakerproductions)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/cannot-install-4-6-phpmailerexception-error/#post-8134734)
 * Upgrade WAMP just to make sure. You never know what new code in WordPress 4.6
   is having problems with the older PHP 5.4.3.
 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/cannot-install-4-6-phpmailerexception-error/#post-8137010)
 * > WP doesn’t require PHP 5.6, but PHP 5.2.4
 * That applies to “If you are in a legacy environment”…
 * > Note: If you are in a legacy environment where you only have older PHP or MySQL
   > versions, WordPress also works with PHP 5.2.4+ and MySQL 5.0+, but these versions
   > have reached official End Of Life and as such may expose your site to security
   > vulnerabilities.
 *  Thread Starter [bg17aw](https://wordpress.org/support/users/bg17aw/)
 * (@bg17aw)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/cannot-install-4-6-phpmailerexception-error/#post-8138576)
 * Hi Tara,
    The key here is `WordPress also works with PHP 5.2.4+ and MySQL 5.0
   +` Let’s not confuse thousands of users using anything older than 5.6 by telling
   them WP won’t work. WP should work on 5.0+, security fixes are referring to PHP
   itself and not WP, and I am on 5.4 So not an issue here.
 *  [AjitKhodke](https://wordpress.org/support/users/ajitkhodke/)
 * (@ajitkhodke)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/cannot-install-4-6-phpmailerexception-error/#post-8212852)
 * It looks like your attempting to use a variable in the email address field of
   the Custom Email?
 *  [oneumyvakin](https://wordpress.org/support/users/oneumyvakin/)
 * (@oneumyvakin)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/cannot-install-4-6-phpmailerexception-error/#post-8448151)
 * I’ve get this issue at managing WordPress via wp-cli
 * The root cause in fact that $_SERVER[‘SERVER_NAME’] is empty in CLI mode:
 * \wp-includes\pluggable.php(352): PHPMailer->setFrom(‘wordpress@’, ‘WordPress’,
   false)
 *     ```
       	if ( !isset( $from_email ) ) {
       		// Get the site domain and get rid of www.
       		$sitename = strtolower( $_SERVER['SERVER_NAME'] );
       		if ( substr( $sitename, 0, 4 ) == 'www.' ) {
       			$sitename = substr( $sitename, 4 );
       		}
   
       		$from_email = 'wordpress@' . $sitename;
       	}
   
       	/**
       	 * Filters the email address to send from.
       	 *
       	 * @since 2.2.0
       	 *
       	 * @param string $from_email Email address to send from.
       	 */
       	$from_email = apply_filters( 'wp_mail_from', $from_email );
   
       	/**
       	 * Filters the name to associate with the "from" email address.
       	 *
       	 * @since 2.3.0
       	 *
       	 * @param string $from_name Name associated with the "from" email address.
       	 */
       	$from_name = apply_filters( 'wp_mail_from_name', $from_name );
   
       	$phpmailer->setFrom( $from_email, $from_name, false );
       ```
   

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Cannot install 4.6, “phpmailerException” error’ is closed to new replies.

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 9 replies
 * 6 participants
 * Last reply from: [oneumyvakin](https://wordpress.org/support/users/oneumyvakin/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/cannot-install-4-6-phpmailerexception-error/#post-8448151)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
