Harsh Makadia
Harsh Makadia

Reputation: 3443

Change bluehost email address in wordpress

Hello guys i'm new to wordpress

I wanted to know if it is possible to change the default sender address of bluehost i.e name@box####.bluehost.com to [email protected]

I'm using a plugin called Email before download which sends email to the people who download files from my website.The mail is sent from name@box####.bluehost.com.

If I try to change the sender email address from email-before-download.php file of Email before download plugin it's not working it still display the default address name@box####.bluehost.com how can I change that sender email address in this case?

Is there any plugin which does that? or we have to change it from the bluehost cpanel?

Upvotes: 1

Views: 718

Answers (3)

Sabari
Sabari

Reputation: 6345

You can use add_filter to achieve this.

Just add this code in your themes function.php

add_filter('wp_mail_from', 'wp_change_default_email_change_from_email');
add_filter('wp_mail_from_name', 'wp_change_default_email_change_from_name');

function wp_change_default_email_change_from_email()
{
    $from_email = '[email protected]';

    return $from_email;
}

function wp_change_default_email_change_from_name() {
    
    $from_name = 'name';

    return $from_name;
}

This updates the default from email and from email address.

Upvotes: 0

Deepak saini
Deepak saini

Reputation: 4270

I found the same problem.

I got to this thread by searching for it.

But I have hit upon a solution. It requires tinkering with a WordPress core file though. If you are not comfortable with it, you may desist from doing it. I am referring to WordPress 2.7 only.

I found in pluggable.php in wp-includes around line 343:

$from_name = 'WordPress';

I changed it to:

$from_name = $blog_title;

Then around line 354:

$from_email = 'wordpress@' . $sitename;

I changed that to:

$from_email = 'administrator@' . $sitename;

That's it. Maybe there is a more elegant way of doing it.

Upvotes: 0

Harsh Makadia
Harsh Makadia

Reputation: 3443

Login to cPanel > File Manager > public_html > php.ini > edit

Search for sendmail keyword . You will find this ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). ; http://php.net/sendmail-path sendmail_path = /usr/sbin/sendmail -t -i

Please add : -f'[email protected]'

Eg: sendmail_path = /usr/sbin/sendmail -t -i -f'[email protected]'

Upvotes: 1

Related Questions