Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: lordmortimer on May 19, 2023, 12:24:16 PM

Title: Multiple problems with email sending
Post by: lordmortimer on May 19, 2023, 12:24:16 PM
Hello everybody,

I can't send emails with my forum and it appears there are different reasons, depending on what kind of email I'm using.

Using a PHP mail, and trying with mail-tester.com, I traced two issues: non-existing MX record (but it exists) and something about DKIM.

Using an SMTP mail, this doesn't get sent and I receive a failure of communication to the server in the forum error log.

Before starting, I ask you: what kind of mail is better to use? Regular PHP or SMTP?

I have SMF 2.1.3
Title: Re: Multiple problems with email sending
Post by: Sesquipedalian on May 19, 2023, 12:42:17 PM
SMTP is always better. Setting it up correctly does require more effort, though.

DKIM is one of the main email authentication methods. Without that set up, there is a very high likelihood that your email messages will be flagged as spam.
Title: Re: Multiple problems with email sending
Post by: lordmortimer on May 19, 2023, 02:16:52 PM
Guess I'll go with solving the SMTP one, then.
The missing communication error is signaled at this url: ../index.php?action=admin;area=mailqueue;sa=test;save

I controlled many times every ID field for the SMTP server: everything is correct, so I'm sure it's not a wrong user/pass/port thing.

What else should I provide?
Title: Re: Multiple problems with email sending
Post by: shawnb61 on May 19, 2023, 03:50:19 PM
Sometimes you need to prefix the server with ssl://
Title: Re: Multiple problems with email sending
Post by: lordmortimer on May 20, 2023, 06:04:20 AM
Quote from: shawnb61 on May 19, 2023, 03:50:19 PMSometimes you need to prefix the server with ssl://
Thank you. This solved the server comm. problem, but it seems there's another one: the test mail is sent but it never arrives. I looked in every folder, including the junk one, and waited for about 2 hours.
Title: Re: Multiple problems with email sending
Post by: Aleksi "Lex" Kilpinen on May 20, 2023, 06:18:40 AM
That would most likely be because the receiving server refused to accept it for some reason. Possible explanations may include webmaster email address not matching the used SMTP account or incorrect/missing header information such as DKIM and SPF.
Title: Re: Multiple problems with email sending
Post by: lordmortimer on May 20, 2023, 09:48:36 AM
Quote from: Aleksi "Lex" Kilpinen on May 20, 2023, 06:18:40 AMPossible explanations may include webmaster email address not matching the used SMTP account.
This one. Now it seems everything is functioning.

Thank you everybody  :-*