News:

Join the Facebook Fan Page.

Main Menu

Notification emails fail

Started by Sir Osis of Liver, April 26, 2023, 01:27:46 PM

Previous topic - Next topic

Sir Osis of Liver

Just fixed this on one forum, and am seeing it on another.  2.0.19 email notifications fail in php 7.4, work in 8.0.  Can anyone confirm?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

shawnb61

#1
I can confirm that the following work fine in 2.0.19 for notification delivery:
SMTP mail type, PHP 7.4 - OK
SMTP mail type, PHP 8.0 - OK
PHP mail type, PHP 7.4 - OK

I believe there is an issue with PHP type, php8+, in 2.0.x. 

I do suggest using SMTP going forward under all circumstances.  I can confirm that more & more mail providers are rejecting the PHP mail type outright.  I ran into that on my own site recently, IIRC, it was outlook.com & hotmail.com that mangled mail sent by the PHP mail type, no matter what PHP or SMF version.  Only SMTP worked.  I believe this is a recent change.


Source: https://help.krystal.uk/mail-channels/what-is-php-mail-and-how-does-it-differ-to-smtp
QuoteWhile PHP mail is a great tool and is easy to use, it should not be used for production environments and certainly not where email deliverability is important (for example, order emails.) as PHP mail has a habit of ending up in Junk Spam Folders due to the unauthenticated nature of the message.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Sir Osis of Liver

Odd thing is, can't replicate this on test install.  My install and client forum are both using php mail, running on different Crocweb servers.  Only difference I see is mysql version.

Cient -
Version Information:
Forum version: SMF 2.0.19 (more detailed)
Current SMF version: SMF 2.0.19
GD version: 2.3.3
Database Server: MariaDB
MySQL version: 10.3.38-MariaDB-cll-lve
PHP: 8.0.28
Server version: LiteSpeed


Test install -
Version Information:
Forum version: SMF 2.0.19 (more detailed)
Current SMF version: SMF 2.1.3
GD version: 2.3.3
Database Server: MariaDB
MySQL version: 10.6.12-MariaDB-cll-lve
PHP: 8.0.28
Server version: LiteSpeed

Client forum is now sending notification emails.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sesquipedalian

If you don't have SPF, DKIM, and DMARC fully configured, email delivery is a crap shoot. Emails from the test install might not (yet) be getting dropped simply because it is new and hasn't gotten onto anyone's naughty list yet.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

shawnb61

Quote from: Sesquipedalian on April 27, 2023, 12:32:13 AMIf you don't have SPF, DKIM, and DMARC fully configured, email delivery is a crap shoot. Emails from the test install might not (yet) be getting dropped simply because it is new and hasn't gotten onto anyone's naughty list yet.

Yep.  It may help to send an email, and once received, and inspect it in its raw format.  In gmail, there is an option to 'Show Original'.   In other email packages, it is often 'View raw format'.  Look for authentication results.

Good news looks something like this (format varies per email client):
You cannot view this attachment.

Bad news looks something like this (format varies per email client):
You cannot view this attachment.

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Aleksi "Lex" Kilpinen

Gmail web version also includes an easy tool just for this alone.
If you choose "Show original", it will also show the checked headers first.

Then good news looks like this.
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Sir Osis of Liver

I would guess most forums are using php mail, it's default in 2.0/2.1, doesn't require any setup.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Aleksi "Lex" Kilpinen

Sadly there's quite literally nothing we can do about that. Some hosts will allow you to configure the server to intercept php mail and "fix it" to match the actual mailserver settings, but this too requires configuration from the user.
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Sir Osis of Liver

Well, updating from php 7.4 to 8.0 fixed it on one forum, so it's not an issue with the mail settings.  I'm trying to get the other forum updated from 7.4 to 8.0, but can't get into cpanel (GoDaddy :P ) and the owner's been offline.  Will be interesting to see if it works on a second server, different host.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

shawnb61

Question - where php8 is working with email type php, is the os windows or Unix?

(The php8 issue is specific to unix.)
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Sir Osis of Liver

Quote from: Sir Osis of Liver on April 26, 2023, 10:12:58 PMCient -
Version Information:
Forum version: SMF 2.0.19 (more detailed)
Current SMF version: SMF 2.0.19
GD version: 2.3.3
Database Server: MariaDB
MySQL version: 10.3.38-MariaDB-cll-lve
PHP: 8.0.28
Server version: LiteSpeed


Test install -
Version Information:
Forum version: SMF 2.0.19 (more detailed)
Current SMF version: SMF 2.1.3
GD version: 2.3.3
Database Server: MariaDB
MySQL version: 10.6.12-MariaDB-cll-lve
PHP: 8.0.28
Server version: LiteSpeed


Both using php mail, on same host different servers, iirc LiteSpeed is linux, accessing both forums with FF102 in Win8.1.  If I revert client forum to php 7.4 notifications fail.  Other members also do not receive notifications.  Client forum is clean install with 5 mods installed, logging only a few user errors.  Will try installing same mods on test install when I'm back on computer tomorrow.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Aleksi "Lex" Kilpinen

Quote from: Sir Osis of Liver on April 27, 2023, 07:34:01 PMWell, updating from php 7.4 to 8.0 fixed it on one forum, so it's not an issue with the mail settings.
Correlation does not imply causation. I'm not saying you are wrong, but I'm saying that you can not know that for sure without further details. It could just be that the php versions on that particular host machine are configured differently by default.
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: