开发者

Sendmail_from function in php.ini

开发者 https://www.devze.com 2023-03-16 13:46 出处:网络
I currently own a hosting package with Bluehost.com. All emails sent from any mail function end up sending in theusername@boxname.bluehost.com. I tried editing a php.ini file for this. It still didn\'

I currently own a hosting package with Bluehost.com. All emails sent from any mail function end up sending in the username@boxname.bluehost.com. 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 addr开发者_如何学Goess.

What exactly can I do?


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@example.com> field in $additional_headers parameter -- worked fine for me so far (I've been using it on GoDaddy and Webfusion UK hosting).


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: address@domain.com to the email's headers, and then ensure that address@domain.com 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.)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号