Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Wyrd on February 15, 2021, 06:42:42 AM

Title: Forum won't send mail
Post by: Wyrd on February 15, 2021, 06:42:42 AM
Hello friends,

I'm trying to configure a forum to send emails. We are able to send emails using Thunderbird, but when we use the same settings at SMF,  no mails are being sent and no errors seem to be created.

I am officially out of ideas, and I hope anybody here might have some left.

The email is configured on the same domain, so no gmail.

We're currently using the following settings:

smtp_host - tls://mail.domain.com
smtp_port - 587
smtp_username - as configured
smtp_password - as configured
mail_type - smtp (or 1)

In thunderbird we use the same servername, port, STARTTLS and Encrypted Password (and username).

We're testing it by using the password reset function.
Title: Re: Forum won't send mail
Post by: Aleksi "Lex" Kilpinen on February 15, 2021, 07:10:55 AM
What is the mail provider you are trying to use? Do you get any errors in your log?
https://wiki.simplemachines.org/smf/E-Mails_-_Why_are_members_not_getting_emails_sent_from_the_forum
Title: Re: Forum won't send mail
Post by: Wyrd on February 15, 2021, 08:01:03 AM
The mail provider is with the domain and server we're renting, I think it's plesk but that might just be the gui.

Strangely enough no errors are appearing.
Title: Re: Forum won't send mail
Post by: Aleksi "Lex" Kilpinen on February 15, 2021, 08:14:03 AM
Have you tried PHP mail? Would sound logical in that situation, as you don't really need to have an actual SMTP connection to another server if I understand correctly.
Title: Re: Forum won't send mail (when resetting password)
Post by: Wyrd on February 15, 2021, 08:32:47 AM
That also doesn't work, and doesn't seem to create errors.

More weird however, is that if I leave everything empty and attempt reset, it also doesn't give any errors whatsoever. So maybe there's something going wrong that it isn't logging errors, or that the reset password doesn't quite work? I'll change the topic title so it might make more sense what I'm trying to do.
Title: Re: Forum won't send mail
Post by: trlacey on March 07, 2021, 02:22:19 AM
Hi Wyrd. Correct settings for the SMF Forum mail are:

smtp_host - tls://mail.domain.com
smtp_port - 465
smtp_username - as configured
smtp_password - as configured

The SMF software doesn't send the STARTTLS command when using Port 587. If you want to use Port 587, the correct settings will be:

smtp_host - mail.domain.com
smtp_port - 587
smtp_username - as configured
smtp_password - as configured

Lose the tls:// and modify the smtp_mail() function in /Sources/Subs-Post.php to send the STARTTLS command and then convert the socket to encrypted TLS mode before sending the AUTH LOGIN.