XF 2.2 Forum Email Broken; Similar Threads Broken

Gene Steinberg

Well-known member
I've found two serious issues with the latest beta (beta 3):

1. I cannot make PHP email work for Contact forms or forum notices. Zilch. This follows install of beta on two of my forums (the less active ones of course).

2. The Similar Threads widget is broken. After I set it up, it's no longer listed either as enabled or as available. I did remove the Similar Threads add-on from AndyB, but no dice.
 
Well, I welcome any ideas. I've not had any previous issues managing email sending with XF till the new betas were installed. But if anyone can help guide me as to what cPanel support might check on my web server, that would also help. I see nothing in the logs for XF.
 
If there are no logs in the XF ACP then the emails have been successfully handed off to the server.
The server mail log would be the next place to check.
If the mails are in the server mail log then they have likely been spam filtered, or blacklisted.

Is ES running and can you confirm it is set up similar to this?
1597781542419.webp

If so, then check in a completely default style.
 
Our larger forum, at theparacast.com works fine. It's just the two forums using the XF 2.2 beta install.

I had cPanel/WHM support check my server and they did a number of tests. According to them, it's a problem with the two XF beta installs. One of the forums was set to use SMTP email. But the other beta forum uses PHP. No difference. This sounds like your bug unless you can tell me what we need to check at our end.

Hi Gene,

I notice that both macradio.net/forum and rockoids.com/forum show no indication of the message hitting the Exim log at all, but theparacast.com/forum does with a successful output as expected.

I created a test mail script under rockoids.com and confirmed that it's capable of sending mail.
[rockoids@server ~]$ vi testscript.php
[rockoids@server ~]$ php -d "display_errors=on" testscript.php
Success!

From Exim:
2020-08-18 15:42:52 1k8AJf-0004sI-Sp <= sender@example.net U=rockoids P=local S=530 T="Test email using PHP" for cpanelnoreply@gmail.com
2020-08-18 15:42:52 1k8AJf-0004sI-Sp Sender identification U=rockoids D=rockoids.com S=sender@rockoids.com
2020-08-18 15:42:52 1k8AJf-0004sI-Sp SMTP connection outbound 1597790572 1k8AJf-0004sI-Sp rockoids.com cpanelnoreply@gmail.com
2020-08-18 15:42:53 1k8AJf-0004sI-Sp => cpanelnoreply@gmail.com R=dkim_lookuphost T=dkim_remote_smtp H=gmail-smtp-in.l.google.com [173.194.196.26] C="250 2.0.0 OK 1597790573 i11si9883707otc.213 - gsmtp"
2020-08-18 15:42:53 1k8AJf-0004sI-Sp Completed

As a separate mail script works, it looks like something is specifically occurring with the website/script that is causing this behavior.
 
And I tried the test tool:

Test outbound email​

Use this tool to diagnose outbound mail transport issues.
The email was sent successfully with no errors. Please note that error tracking may be limited when using sendmail. If you do not receive the email, please check the server's email log for more details.
Email ————————--
Email transport class
\Swift_SendmailTransport (/usr/sbin/sendmail -t -i)

Run test

Even though it was allegedly sent successfully, we never got the emails, nor do the logs show their presence. Note the tests the cPanel person performed. So the messages it's generating are not correct; the mail disappears and never arrives.
 
Update:

cPanel cannot figure out why the two beta forums aren't sending out emails. They do not end up in Exim. They say it's a script problem.

I disabled all add-ons as tests. Same problem.

I replaced all the install files and rebuilt master data. No change.

I receive normal emails from the 2.1.x installation and all my WordPress blogs, some of which are in the same domains as the beta forums.

If there's an "x-factor" other than a problem with XF 2.2 beta, I haven't found it.
 
Add this to the config.php file:
PHP:
$c->extend('mailer.transport', function()
{
    return \XF\Mail\Mailer::getTransportFromOption('file', [
        'path' => \XF::getRootDirectory() . '/internal_data'
    ]);
});

Then send a test email from the ACP.

If XF is functioning correctly, there should be a text file generated in the internal_data directory.
 
Then either something went wrong with both upgrades, or there is some third party code involved.

This site and many others are running on 2.2 without issue and we haven't had any other reports of emails failing completely.
 
I redid the upgrade, as stated above, by replacing the files (all of them) and rebuilding master data.

I disabled all add-ons.

So where do I go next?

It's just these two forums, remember. The one with the release version runs fine. It's all on the same cPanel dedicated server.
 
I had cPanel check the server already. I do have a support admin who manages cPanel servers, but I'd need to know what to tell him to check beyond what has already been checked.
 
I'm halfway there.

I was able to make rockoids.com/forum work this way:

1. Disable all add-ons.
2. Rebuild master data.

This restored the email function. I then continued.

3. Enabled add-ons one at a time, removing a few that provided at best a minor enhancement or additional feature.

I was able to find one email add-on, Inactive Members, which didn't work; at least it didn't send messages when I tested it. But the rest of the email function continued to work, so I disabled that add-on.

But macradio.net/forum continues to fail despite steps one and two. I got it to work just once, but soon as I enabled an add-on, it broke. I went through steps one and two again, but the email function is still broken.

The attached phpinfo file spells out my configuration, plus MySQL 10.3.24, in case anyone can suggest something I need to add or remove.
 

Attachments


I wish resource threads would open in the Overview, and not in the most recent discussion one has read.
 
Back
Top Bottom