Posts Tagged ‘wordpress emails’

My WordPress Blog is Sending Mail With My Webhosts Address

Here’s our solu­tion. Be sure your work­ing with the most up to date file. Local copies can become out­dated with online updates. Edit the fol­low­ing file: wordpress-root-directory/wp-includes/class-phpmailer.php

On line 75 (valid on Word­Press 2.7.1 — 2.8.7) and edit, “root@localhost.com” to the address you’de like to appear in admin­is­tra­tive emails, ie. user@yourdomain.com. You’ll also want to change your From­Name, on line 81, and your email address on line 88. Sim­ply fill the empty quotes.

71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
  /**
   * Sets the From email address for the message.
   * @var string
   */
  var $From              = 'root@localhost';
 
  /**
   * Sets the From name of the message.
   * @var string
   */
  var $FromName          = 'Root User';
 
  /**
   * Sets the Sender email (Return-Path) of the message.  If not empty,
   * will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode.
   * @var string
   */
  var $Sender            = '';

And that’s it. Your sever will now send admin­is­tra­tive Emails from your cho­sen name, and address. Let us know if this was helpful.