Title: class-phpmailer.php claims &#8220;localhost&#8221;
Last modified: August 19, 2016

---

# class-phpmailer.php claims “localhost”

 *  [rosely](https://wordpress.org/support/users/rosely/)
 * (@rosely)
 * [18 years ago](https://wordpress.org/support/topic/class-phpmailerphp-claims-localhost/)
 * Hi!
 * First of all, the upgrade to 2.5.1 is really good to me. I think it all has improved
   a lot!
 * There’s however a small problem in the file “wp-includes/class-phpmailer.php”
 * At line 156 it sets the variable $Host at “localhost”
 * Now this will be good for 99% of the users, but not for everyone. The host is
   already defined in the config.php, and so it would be better to get that variable
   from there.
    For now I’ve edited the file and changed “localhost” into what I
   need, but this means that with every upgrade, I’ll have to edit that cause otherwise
   I won’t be able to send out emails.
 * It would be really nice if this could be fixed in the new WordPress Release 🙂
 * Thanks!

The topic ‘class-phpmailer.php claims “localhost”’ is closed to new replies.

## Tags

 * [class-phpmailer.php](https://wordpress.org/support/topic-tag/class-phpmailer-php/)
 * [CONFIG.php](https://wordpress.org/support/topic-tag/config-php/)
 * [email](https://wordpress.org/support/topic-tag/email/)
 * [host](https://wordpress.org/support/topic-tag/host/)

 * In: [Requests and Feedback](https://wordpress.org/support/forum/requests-and-feedback/)
 * 0 replies
 * 1 participant
 * Last reply from: [rosely](https://wordpress.org/support/users/rosely/)
 * Last activity: [18 years ago](https://wordpress.org/support/topic/class-phpmailerphp-claims-localhost/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
