MAIL not working (Technics)

by Jean-Michel2 @, Brussels, Tuesday, February 26, 2019, 23:07 (1877 days ago)

I noticed that the mail function is no longer working. It worked until recently and I did not upgrade since then. I have two forums (different versions) and they are hosted by the same host, so I guess it is rather linked to the host server. I would be glad to log a ticket to them, but what can I say ? What command is MLF using to send emails and is there a possibility that this is being blocked by the server ?

MLF 2.3.6.1
MLF 2.4.19.1
server PHP 5.4

What I noticed :
No automatic mail to admin & moderator when new posting
No mail on reply to my post
No credential mail to User created by Admin
No incoming mail to Admin for validation of New User.
No validation mail to user when changing email address
No incoming mail from user via the contact address

So, no mail at all, but also no error message.

Thanx,

Jean-Michel

Avatar

MAIL not working

by Auge ⌂, Wednesday, February 27, 2019, 11:10 (1877 days ago) @ Jean-Michel2

Hello

I noticed that the mail function is no longer working. It worked until recently and I did not upgrade since then. I have two forums (different versions) and they are hosted by the same host, so I guess it is rather linked to the host server.

This might be possible. We changed the e-mail-headers because several forum operators was blocked by their hosters because being suspected to send spam from their forums. But this affects only some but not all cases

I would be glad to log a ticket to them, but what can I say ? What command is MLF using to send emails and is there a possibility that this is being blocked by the server ?

Until now the forum script use the mail function to deliver the e-mails to the systems own mail system (in case of Linux/Unix: sendmail or similar). We want to introduce a SMTP-class as default for MLF2.5 but this only affects versions in and of the future.

MLF 2.3.6.1
MLF 2.4.19.1
server PHP 5.4

I will look into the differences between the e-mail-handling of the versions. By the way and supposable without a relation to the current problem, your PHP-version is definitively outdated. You should upgrade to PHP 7.x (my forum works under PHP 7.2 without problems).

… no mail at all, but also no error message.

We can only see errors of the function mail in itself. We can not see any problems in case of not working e-mail transmission after handing over the e-mail to the e-mail-system with mail.

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

MAIL not working

by Jean-Michel2 @, Wednesday, February 27, 2019, 21:23 (1876 days ago) @ Auge
edited by Jean-Michel2, Wednesday, February 27, 2019, 21:49

Thx for the quick answer.

I changed PHP to 5.5 without noticeable change. More is not possible.

I had a look at the PHP config:
sendmail_path : /usr/sbin/smtppush -t -i -f info@mysite.be

No idea what it means.

The server log doesn't help. Disabled functions are : phpinfo, system, exec, passthru, proc_open, shell_exec, popen, setlimit, glob, mysql_pconnect, stream_socket_client"

Jean-Michel

Avatar

MAIL not working

by Auge ⌂, Thursday, February 28, 2019, 08:53 (1876 days ago) @ Jean-Michel2

Hello

I changed PHP to 5.5 without noticeable change. More is not possible.

Even I must say, that PHP 5.5 also is outdated, I can say that I expected no difference between PHP 5.4 and 5.5 or even 5.6 or 7.x at that point.

I had a look at the PHP config:
sendmail_path : /usr/sbin/smtppush -t -i -f info@mysite.be

No idea what it means.

A program call of smtppush when taking over an e-mail, must be suffixed with the parameters -t -i -f info@mysite.be. As far as I know the e-mail, given in parameter -f must be the sender. For more details ask your hosting company (FAQ, customer service) and compare the forum settings (advanced settings) of your two forums. Look there for the setting mail_parameter. By the way, this is the setting, where you have to store the real parameter list (in your example -t -i -f info@mysite.be).

The server log doesn't help. Disabled functions are : phpinfo, system, exec, passthru, proc_open, shell_exec, popen, setlimit, glob, mysql_pconnect, stream_socket_client"

These functions are not related to your current problem.

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

Avatar

MAIL not working

by Micha ⌂, Thursday, February 28, 2019, 09:10 (1876 days ago) @ Auge

Hello,

As far as I know the e-mail, given in parameter -f must be the sender.

And sometimes, you have to add the parameter while calling the mail function. MLF supports the option mail_parameter.

/Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Host server says not on their side

by Jean-Michel2 @, Wednesday, March 20, 2019, 09:13 (1856 days ago) @ Micha

Hi Guys,


To be clear : I'm no expert, doing my best.

I got in contact with the forum host but they say the server is not responsible for the malfunction. So I'm stuck between MLF that seems to have sent the mail (?) and the host that says it's not on their side (?).

If MLF effectively sends the mail, how can I prove it to the Host ? Is there any log at MLF side that I can refer to or can this kind of logging be activated on demand?

Here is the test code they gave to me. Seems to be the same as in functions.inc
I tried with \r\n instead of \n in my_mail in functions_inc but did not change anything.

<?php
$to = 'destinataire@domaine.tld';
$subject = 'un nouveau sujet';
$message = "Ceci essaie d'envoi d'email";
$headers = 'From: votreadresse@domaine.tld' . "\r\n" .
'Reply-To: votreadresse@domaine.tld' . "\r\n" .
'Return-Path:votreadresse@domaine.tld'."\r\n".
'X-Mailer: PHP/' . phpversion();

// Send
if(mail($to, $subject, $message, $headers)){
echo "ok";
}else{
echo"non envoyé";
}

Avatar

Host server says not on their side

by Auge ⌂, Thursday, March 21, 2019, 13:44 (1855 days ago) @ Jean-Michel2

Hello

To be clear : I'm no expert, doing my best.

I got in contact with the forum host but they say the server is not responsible for the malfunction. So I'm stuck between MLF that seems to have sent the mail (?) and the host that says it's not on their side (?).

To also be clear and to clarify how it's done: MLF itself sends no e-mail. MLF utilises the function mail to deliver the e-mail to the systems own mail transfer agent (MTA). That MTA, driven by your hosting company sends or sends not the e-mail. BUT it might be the case, that the MTA expects the mail-function of PHP to send special parameters with the e-mail during the delivery to the MTA.

As you said, there is an installation, that sends e-mails and one that don't. Please compare the advanced settings for the setting mail_parameter in both installations.

If MLF effectively sends the mail, how can I prove it to the Host ? Is there any log at MLF side that I can refer to or can this kind of logging be activated on demand?

No, there isn't and can't.

Here is the test code they gave to me. Seems to be the same as in functions.inc
I tried with \r\n instead of \n in my_mail in functions_inc but did not change anything.

<?php
$to = 'destinataire@domaine.tld';
$subject = 'un nouveau sujet';
$message = "Ceci essaie d'envoi d'email";
$headers = 'From: votreadresse@domaine.tld' . "\r\n" .
'Reply-To: votreadresse@domaine.tld' . "\r\n" .
'Return-Path:votreadresse@domaine.tld'."\r\n".
'X-Mailer: PHP/' . phpversion();

// Send
if(mail($to, $subject, $message, $headers)){
echo "ok";
}else{
echo"non envoyé";
}

Does the code sends an e-mail or not?

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

Solved

by Jean-Michel2 @, Friday, March 22, 2019, 18:41 (1854 days ago) @ Auge

I won't know the answer. It's working now ! I guess it was a host issue, very strange. Maybe the mail server blocked it and then unblocked it when I logged a ticket... Everything is possible.

In any case, thanks so much for having taken the time to answer, it was no lost time as I was able to progress on the issue and next time I know what to do.

Tschüss from Brussels

Jean-Michel

RSS Feed of thread