Results 1 to 7 of 7

Thread: Change the default WordPress "from" email address

  1. #1
    Thread Starter
    dubya's Avatar
    Join Date
    May 2009
    Location
    Canada
    Posts
    1,000
    Thanks
    115
    Thanked 107 Times in 93 Posts

    Change the default WordPress "from" email address

    Problem:
    When a user registers, their password email is sent from "WordPress@yourdomain.com".
    Not so professional looking is it?

    WARNING: If you do this, keep in mind that you are messing with WP core files. Do so at your own risk. Also, because this is a WordPress core file, you will have to do this again every time you upgrade. You've been warned.

    Solution:
    Edit /wp-includes/pluggable.php
    Look for line 369 (or there abouts)
    Code:
    		$from_email = 'wordpress@' . $sitename;
    Replace wordpress with admin, or whatever username you have as one of your domain accounts. Mine looks like this:
    Code:
    		$from_email = 'admin@' . $sitename;
    Then look for line 1018 (or there abouts)
    Code:
    	$wp_email = 'wordpress@' . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME']));
    Once again, replace wordpress with admin, or whatever username you have as one of your domain accounts. Mine looks like this:
    Code:
    	$wp_email = 'admin@' . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME']));
    Nothing to it.
    This is tested and working on WordPress 2.8.2 with ClassiPress 2.9.2

    edit: woot! This was my 100th post!
    The search button. Your new best friend.
    - Dubya

  2. #2
    Veteran pointandstare's Avatar
    Join Date
    Apr 2009
    Location
    London, England
    Posts
    311
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Change the default WordPress "from" email address

    See my reply in your other post.

  3. #3
    Thread Starter
    dubya's Avatar
    Join Date
    May 2009
    Location
    Canada
    Posts
    1,000
    Thanks
    115
    Thanked 107 Times in 93 Posts

    Re: Change the default WordPress "from" email address

    Quote Originally Posted by PointandStare
    ... or to play safe you could of simply installed this plugin.

    Will save a lot of headaches when you upgrade.
    hmmph! And I was so proud of myself too.
    The search button. Your new best friend.
    - Dubya

  4. #4
    Senior Member jakesterz's Avatar
    Join Date
    Aug 2009
    Posts
    194
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Change the default WordPress "from" email address

    Quote Originally Posted by dubya
    Quote Originally Posted by PointandStare
    ... or to play safe you could of simply installed this plugin.

    Will save a lot of headaches when you upgrade.
    hmmph! And I was so proud of myself too.
    Will that interfere with the SB Welcome Email Editor plugin thats included with classipress?

  5. #5
    krauses's Avatar
    Join Date
    Jun 2009
    Location
    United States
    Posts
    64
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Change the default WordPress "from" email address

    Worked great. Thanks guys.

  6. #6
    Member
    Not a Verified Customer
    Cyrus's Avatar
    Join Date
    May 2009
    Location
    Curacao, Netherlands Antilles
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Change the default WordPress "from" email address

    Quote Originally Posted by dubya
    Quote Originally Posted by PointandStare
    ... or to play safe you could of simply installed this plugin.

    Will save a lot of headaches when you upgrade.
    hmmph! And I was so proud of myself too.
    Plugins slow down your website.

    If you can hard-code something, do it. Because in the end it's always worth it.

    Here's a few other plugin free hacks for wordpress:
    http://www.smashingmagazine.com/2009/04 ... ess-hacks/


  7. #7
    Rookie
    Not a Verified Customer
    inzltd's Avatar
    Join Date
    Nov 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Change the default WordPress "from" email address

    Quote Originally Posted by Cyrus
    Plugins slow down your website.
    Hmmm, slight performance overhead or have to manually redo hacks after every upgrade.

    Difficult choice... NOT!

    This is something that WP should address within the core code but until they do this plugin works brilliantly.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Looking for a wordpress plugin
    By bili.ph in forum ClassiPress General Discussion
    Replies: 3
    Last Post: August 5th, 2011, 05:25 PM