Replacing text in new user emails From: "WordPress"
Originally Posted by
laura
Okay, I found it
Go to
wp-content/themes/vantage/includes/emails.php line 101 and change where it says "wordpress@$domain" to whatever you want.
I've been searching through the JobRoller Forums for some time for an answer to the problem of replacing "WordPress" in the From: field of new user emails, so thanks to @laura in the Vantage Forums, I worked out how to replace the From: "Wordpress", for JobRoller new user emails, as follows:
I found
wp-includes/pluggable.php and created a backup called pluggable-original.php (in case things went pear-shaped) and replaced the information section of pluggable.php in lines 1-7 with the following code lines 1-9 (adding 2 extra lines for the additional info, see below) - I do this sort of thing in all edits so that I know what to do next time - then I copy the new information block into a word document for future reference and as a backup:
Code:
<?php
/**
* These functions can be replaced via plugins. If plugins do not redefine these functions, then these will be used instead.
* Form: /home/mydomain/public_html/wp-includes/pluggable.php
* Edit new line 311 on 24/06/12 Changing: $from_name = 'WordPress'; To: $from_name = 'mydomain';
* Edit new line 327 on 24/06/12 Changing: $from_email = 'wordpress@' . $sitename; To: $from_email = 'admin@' . $sitename;
* Edit new line 1043 on 24/06/12 Changing: $wp_email = 'wordpress@' To: $wp_email = 'admin@'
* @package WordPress
*/
Lines 5,6,7 above explain the three simple edits you will need to make in the newly numbered lines 311, 327 and 1043 in pluggable.php. You can replace the "WordPress" in line 311 with anything you like - it will then appear in the From: line of your new user emails and you can replace the "wordpress@" in lines 327 and 1043 with any suitable email username from your site, eg "fred", so that your email from_address will show as "fred@mydomain.com".
This seems to work perfectly on creating a new user. However, because the pluggable.php is Wordpress Code, not JobRoller or ClassiPress theme code, there's no way to include it in the themes or any child-themes, so that you will have to make these three edits every time you update WordPress. Creating a plugin to do the same thing might work, but that's beyond my self-taught skills.