Seye Kuyinu
Seye Kuyinu

Reputation: 121

Sendmail_from function in php.ini

I currently own a hosting package with Bluehost.com. All emails sent from any mail function end up sending in the [email protected]. I tried editing a php.ini file for this. It still didn't work.

I am running WordPress. When new users are registered, they are emailed with this bluehost formatted email address.

What exactly can I do?

Upvotes: 0

Views: 2959

Answers (2)

David Hayes
David Hayes

Reputation: 150

This stumped me recently. This is caused by something Bluehost does to prevent you from spamming/phishing and claiming you're someone you're not. If the script you're using claims a from address that isn't configured in your Bluehost account, they won't let you use it as the from address in Sendmail, and will instead replace it with that user@box###.bluehost.com string.

So essentially, you need to make sure, as LazyOne explains, that the sending script is adding a From: [email protected] to the email's headers, and then ensure that [email protected] is also set as a valid address in your Bluehost account. (I personally alway set them up and then forward them to one account, but that's certainly not necessary.)

Upvotes: 1

LazyOne
LazyOne

Reputation: 165288

How do you send the emails? I assume using mail() PHP function and not special class like SwiftMailer or PHPMailer?

If so -- you should manually provide proper From: "Your Name" <[email protected]> field in $additional_headers parameter -- worked fine for me so far (I've been using it on GoDaddy and Webfusion UK hosting).

Upvotes: 1

Related Questions