Not receiving emails and strange lines of code

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
intrelis
Registered User
Posts: 8
Joined: Fri Dec 29, 2017 12:55 pm

Not receiving emails and strange lines of code

Post by intrelis » Mon Apr 15, 2019 7:43 am

Support Request Template
What version of phpBB are you using? phpBB 3.2.5
What is your board's URL? https://forumagape.com
Who do you host your board with? truehoster.net
How did you install your board? I used the download package from phpBB.com
What is the most recent action performed on your board? Fresh Install
Is registration required to reproduce this issue? Yes
Do you have any MODs installed? No
Do you have any extensions installed? Yes
What extensions do you have installed? Thanks for posts
What styles do you currently have installed? Prolight
What language(s) is your board currently using? Bulgarian
Which database type/version are you using? MySQL 5
What is your level of experience? New to PHP and phpBB
What username can be used to view this issue? Any newly created user
What password can be used to view this issue? No answer given
What actions did you take (updating your board; installing a MOD, style or extension; etc.) prior to this problem becoming noticeable? I honestly don't know. I think it was always like this, but I can't be sure either.
Please describe your problem. During certain operations, like registering a new user or requesting a new password, some code appears at the top of the page. When registering, it appears as the registration is successful (though neither the admin nor the user receive an email, even when the user is approved), but when requesting a password, well, no email is sent. I don't know if the email issue is related to these lines of code, or if there are separate problems, but when I select registration by email (not admin), then the user does receive an email, so I find it very strange... Below is the code :
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_messenger.php on line 1607: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number

Warning: Cannot modify header information - headers already sent by (output started at /home/theanoin/public_html/forumagape.com/includes/functions.php:3314) in /home/theanoin/public_html/forumagape.com/includes/functions.php on line 4564
The last line is repeated three times, identical.

It appears to be something related to SSL sertificates maybe? I'm just using the free one that my hosting provider offers.
Generated by SRT Generator

User avatar
Mick
Support Team Member
Support Team Member
Posts: 21078
Joined: Fri Aug 29, 2008 9:49 am
Location: Watching cricket - definitely

Re: Not receiving emails and strange lines of code

Post by Mick » Mon Apr 15, 2019 7:50 am

Can you post screen caps of your mail settings please? This *may* help Knowledge Base - EMAIL - Easy setup (NOT SMTP). Also, your Cookie domain needs a dot in front like .forumagape.com, see Fixing incorrect cookie settings.
"The more connected we get the more alone we become" - Kyle Broflovski

User avatar
EA117
Registered User
Posts: 610
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Not receiving emails and strange lines of code

Post by EA117 » Mon Apr 15, 2019 1:44 pm

intrelis wrote:
Mon Apr 15, 2019 7:43 am
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_messenger.php on line 1607: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number

Warning: Cannot modify header information - headers already sent by (output started at /home/theanoin/public_html/forumagape.com/includes/functions.php:3314) in /home/theanoin/public_html/forumagape.com/includes/functions.php on line 4564
I haven't seen it before, but I suspect that the "SSL3_GET_RECORD:wrong version number" might be the way some particular server platform is reporting "you are attempting to use a deprecated encryption negotiation." The SMTP client in phpBB still only negotiates TLS 1.0, which is explicitly blocked now by many servers due to the known vulnerabilities of this older version (same as SSLv3 and older have been long-deprecated and disabled by most servers, too).

If using your hosting service's PHP mail() function would otherwise work fine for your mailing purposes, then the configuration Mick pointed to in EMAIL - Easy setup (NOT SMTP) would work around the issue by avoiding use of phpBB's built-in SMTP client code.

If you need to avoid using your hosting service's PHP mail() function, or you have other reasons to continue using your current SMTP server for sending email, then there is a patch provided by Dion for the phpBB 3.2.5 functions_messenger.php attached to this message: viewtopic.php?f=556&t=2501651&p=15195926#p15195926 Which fixes the phpBB SMTP client code and allows it to negotiate TLS 1.1 or higher.

intrelis
Registered User
Posts: 8
Joined: Fri Dec 29, 2017 12:55 pm

Re: Not receiving emails and strange lines of code

Post by intrelis » Thu Apr 18, 2019 2:52 pm

EA117 wrote:
Mon Apr 15, 2019 1:44 pm
Mick wrote:
Mon Apr 15, 2019 7:50 am
Thank you both for the replies and sorry for my own late reply.

I tried your suggestions, I fixed the cookie settings and I disabled SMTP, setting up the forum to send mails by php (new internal email), but it doesn't seem to work at all. Test emails aren't received and if a user requests a new password or any other interaction, no emails are sent either. Personally I'd rather not use SMTP if I can help it.

On the bright side, the error code disappeared after I disabled SMTP. Email still doesn't work though, so any ideas are appreciated.

User avatar
EA117
Registered User
Posts: 610
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Not receiving emails and strange lines of code

Post by EA117 » Thu Apr 18, 2019 4:34 pm

intrelis wrote:
Thu Apr 18, 2019 2:52 pm
On the bright side, the error code disappeared after I disabled SMTP. Email still doesn't work though...
That's actually part of the reason I prefer to use phpBB's SMTP client; because when there is an error response from the SMTP server, or some other failure that can be revealed in the communication with the mail server, you typically get to "see something" in the error log.

Note of course ultimately SMTP is still being used no matter what your configuration is; the configuration to use the PHP mail() function just means you're asking for "something else" (typically sendmail) to do the SMTP work for you instead of phpBB itself. And, it's up to your hosting service to have correctly configured what both PHP mail() and sendmail will end up doing on your hosting platform. But then for any issues, you either need some kind of diagnostic visibility into actions that were performed outside of phpBB; or more typically must just ask your hosting provider to troubleshoot it for you, because they don't make their internal mail system logging accessible to you.

Both approaches should be functional, though.

To continue along the "use PHP mail() instead" path, the next step needed to resolve "why doesn't the new mailbox I created through my hosting service actually work" will be to talk to your hosting service. To have them test from both a general email functionality standpoint for the new mailbox that was created, and also from a PHP mail() functionality standpoint on their hosting account.

I'm not sure if "tried the suggestions" includes resolving the SMTP TLS 1.1+ negotiation or not. If that was applied while still configured to have phpBB do the SMTP work, and it still didn't resolve the issue, I'm curious to confirm what error was then shown in the error log, if it was any different from before. If you don't want to pursue fixing the SMTP client code that's fine too; just wondering whether it actually had been done.

User avatar
MarkDHamill
Registered User
Posts: 3790
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: Not receiving emails and strange lines of code

Post by MarkDHamill » Thu Apr 18, 2019 6:35 pm

I wrote a blog post about emailing problems with phpBB. Sometimes it's your host blocking outgoing email because it looks spammish and the don't want to get a reputation. I've had numerous clients using GoDaddy with this problem and it took a lot of back and forth with their support and certifying you weren't really sending spam to get it going again.

https://www.phpbbservices.com/2017/09/1 ... -problems/
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

intrelis
Registered User
Posts: 8
Joined: Fri Dec 29, 2017 12:55 pm

Re: Not receiving emails and strange lines of code

Post by intrelis » Fri Apr 19, 2019 12:47 pm

MarkDHamill wrote:
Thu Apr 18, 2019 6:35 pm
Sometimes it's your host blocking outgoing email because it looks spammish and the don't want to get a reputation.
Thank you for that. I will ask them whether something like this could be the problem.
EA117 wrote:
Thu Apr 18, 2019 4:34 pm
To continue along the "use PHP mail() instead" path, the next step needed to resolve "why doesn't the new mailbox I created through my hosting service actually work" will be to talk to your hosting service
I haven't tried the SMTP route yet, I'm hoping to get it fixed with the PHP. If not, I'll tackle that later.

I contacted my hosting provider, now awaiting response. What I didn't know existed was the error log. I found these two errors:

This one has my (an admin) username attached, so I think it's when I've tried to send a test mail.

Code: Select all

Email error
» EMAIL/PHP/mail()
/adm/index.php
This other one has "Anonymous" for username

Code: Select all

Email error
» EMAIL/PHP/mail()
/ucp.php
EDIT: Got a reply saying they recommend I create a new email account to set up using SMTP. I did that and the error I got when sending a test email was:

Code: Select all

Email error
» EMAIL/SMTP
/adm/index.php

Could not get mail server response codes.
Backtrace
Last edited by Mick on Fri Apr 19, 2019 1:22 pm, edited 1 time in total.
Reason: Removed unnecessary quoting.

Post Reply

Return to “[3.2.x] Support Forum”