MyBB Community Forums

Full Version: PHP Mail - Sometimes it works, sometimes...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi everyone,

I would love to get some support on a new forum I have created for the 80's band Gang of Four. I am having issues with the activation email sometimes not being sent. It's a little strange as sometimes it works and sometimes it doesn't. Normally Gmail and Hotmail work fine, but most other domain albums don't work at all. I don't get any error messages in my email log, they just never arrive.

So I have a number of users building up now that are not fully registered because they are not receiving their activation emails.

Now I tried experimenting with the functions.php file by adding the following line of code ini_set("sendmail_from", " [email protected] "); but this seemed to have no effect.

I tried the SMTP settings but my server doesn't seem to support the same settings as mybb so that was a no go. Now I have checked with my host and they do support PHP mail, as long as the send from address is on their domain. So I have changed the settings in the the configuration area, as in the contact and admin email address both to [email protected]

What makes all this most confusing is some activation emails send successfully and others dont. Maybe somebody could suggest some help please.

Thanks

www.community.gangoffour.co.uk
If it's a case of 'some' email hosts are receiving it, you're likely being blacklisted. Gmail and Hotmail have pretty good spam filters, so they let pretty much anything through and let if filter down into your spam box.

Other email hosts will block any mail sent from a specific domain, and it never ends up in the user's mailbox. At least, this is the only thing I can think of that would effect it without error messages.
So what do I do to correct this? How has my domain become blacklisted?

Does anybody else have any alternative conclusions to my problem, or do other people agree its a blacklisting problem?
Could be some other problem, but that's just what came to mind when reading your problem!

You normally contact the email provider and request a whitelist for your domain. It's a pain. It normally stems from your server being used for spam attacks (shared hosting, etc.), but there could be other reasons.
OK, after some reading, I think I may have had my PHP coding wrong, my host is saying I need to use something called the -f parameter... or maybe the email should be [email protected] not [email protected]... I have no idea, I'm out of my depth, I don't even know what PHP stands for let alone how to custom code it.

Basically does anybody know how to edit the functions.php file properly...
(2009-05-19, 02:51 PM)CGW Lambert Wrote: [ -> ]..., my host is saying I need to use something called the -f parameter...
The -f parameter sets the "envelope from" in PHP mail and the "Return Path" in the email header. Bounce messages should go to the return path which by default on a shared server will be something like username @ node99.hostname.com.

go to ACP > Configuration > Mail Settings
....Additional Parameters for PHP's mail()

in the box add -f emailname @ example.com (no space before/after @ ) Then the returns (bounces) will go to emailname @ example.com