not sending mail - alltough eMailTest says its successful

not sending mail - alltough eMailTest says its successful

by Thijs Sins -
Number of replies: 9

Dear sir/mme,

I could use a little help. I have been trying to repair my outgoing email for the new students login and the chat function. It's not working. I do get json error when sending a chat message.

To solve this riddle I have filled in all smtp details, and allready installed eMailTest. 

The test service says it's successful but Im not receiving the mails.

This is the log, it says Moodle has succesfully delivered the test message to the smtp server :

2019-12-04 22:12:07	CLIENT -> SERVER: Message-ID: <5de82f37849ce8.39295883/coach@**.nl>
2019-12-04 22:12:07	CLIENT -> SERVER: X-Mailer: PHPMailer Moodle 2017051502.02 (https://github.com/PHPMailer/PHPMailer)
2019-12-04 22:12:07	CLIENT -> SERVER: MIME-Version: 1.0
2019-12-04 22:12:07	CLIENT -> SERVER: Content-Type: multipart/alternative;
2019-12-04 22:12:07	CLIENT -> SERVER: 	boundary="b1_4577bc6107ffa5f3f550be984970d7b3"
2019-12-04 22:12:07	CLIENT -> SERVER:
2019-12-04 22:12:07	CLIENT -> SERVER: This is a multi-part message in MIME format.
2019-12-04 22:12:07	CLIENT -> SERVER:
2019-12-04 22:12:07	CLIENT -> SERVER: --b1_4577bc6107ffa5f3f550be984970d7b3
2019-12-04 22:12:07	CLIENT -> SERVER: Content-Type: text/plain; charset=UTF-8
2019-12-04 22:12:07	CLIENT -> SERVER: Content-Transfer-Encoding: quoted-printable
2019-12-04 22:12:07	CLIENT -> SERVER:
2019-12-04 22:12:07	CLIENT -> SERVER:
2019-12-04 22:12:07	CLIENT -> SERVER: Dit is een testbericht. Je kunt het negeren
2019-12-04 22:12:07	CLIENT -> SERVER:
2019-12-04 22:12:07	CLIENT -> SERVER: Als je dit bericht krijgt, dan betekent dit dat je de e-mailinstellingen
2019-12-04 22:12:07	CLIENT -> SERVER: van je Moodle-site juist geconfigureerd hebt.
2019-12-04 22:12:07	CLIENT -> SERVER:
2019-12-04 22:12:07	CLIENT -> SERVER: -------------------------
2019-12-04 22:12:07	CLIENT -> SERVER:
2019-12-04 22:12:07	CLIENT -> SERVER: BIJKOMENDE GEBRUIKERSINFORMATIE:
2019-12-04 22:12:07	CLIENT -> SERVER:
2019-12-04 22:12:07	CLIENT -> SERVER: 	* REGISTRATIESTATUS: Geregistreerde gebruiker (**).
2019-12-04 22:12:07	CLIENT -> SERVER: 	* VOORKEURSTAAL: nl
2019-12-04 22:12:07	CLIENT -> SERVER: 	* GEBRUIKTE WEB BROWSER: Mozilla/5.0 (Windows NT 10.0; Win64; x64;
2019-12-04 22:12:07	CLIENT -> SERVER: rv:70.0) Gecko/20100101 Firefox/70.0
2019-12-04 22:12:07	CLIENT -> SERVER: 	* BERICHT VERSTUURD VAN: http://tatkraft.nl/coaching/local/mailtest/
2019-12-04 22:12:07	CLIENT -> SERVER: 	* MOODLE VERSIE : 3.3.2+ (Build: 20170915)
2019-12-04 22:12:07	CLIENT -> SERVER: 	* IP-ADDRES VAN DE GEBRUIKER: 77.173.169.***
2019-12-04 22:12:07	CLIENT -> SERVER:
2019-12-04 22:12:07	CLIENT -> SERVER:
2019-12-04 22:12:07	CLIENT -> SERVER: --b1_4577bc6107ffa5f3f550be984970d7b3
2019-12-04 22:12:07	CLIENT -> SERVER: Content-Type: text/html; charset=UTF-8
2019-12-04 22:12:07	CLIENT -> SERVER: Content-Transfer-Encoding: quoted-printable
2019-12-04 22:12:07	CLIENT -> SERVER:
2019-12-04 22:12:07	CLIENT -> SERVER: 

Dit is een testbericht. Je kunt het negeren

2019-12-04 22:12:07 CLIENT -> SERVER:

Als je dit bericht krijgt, dan betekent dit dat je de e-mailinstellingen= 2019-12-04 22:12:07 CLIENT -> SERVER: van je Moodle-site juist geconfigureerd hebt.

2019-12-04 22:12:07 CLIENT -> SERVER: Who would be so kind to give me a lead on solving this ?

Kind regards,

Thijs

Average of ratings: -
In reply to Thijs Sins

Re: not sending mail - alltough eMailTest says its successful

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Thijs

You wrote:
> I have filled in all smtp details,

What are they? You may mask any sensitive information.
In reply to Visvanath Ratnaweera

Re: not sending mail - alltough eMailTest says its successful

by Thijs Sins -

Hi Visvanath,

Thanks for your quick reply, here's the screenshot of the smtp details.

Thanks again

Thijs

Attachment screenshot.png
In reply to Thijs Sins

Re: not sending mail - alltough eMailTest says its successful

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
OK. Your Moodle delivers its mails to an external SMTP-Auth server. You could try that account independently of Moodle by sending mail from a mail client. Try configuring Thunderbird with this account.
In reply to Visvanath Ratnaweera

Re: not sending mail - alltough eMailTest says its successful

by Thijs Sins -
Thanks Visvanath,

It is my current mail adress and these same settings work on both iphone mail and outlook.
So it works independently of Moodle.

Is that what you meant to ask?
Best regards,
Thijs
In reply to Thijs Sins

Re: not sending mail - alltough eMailTest says its successful

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi

Yes, that is what I meant. Whether some other program can send mail with the same particulars.

Now I see that you said "alltough eMailTest says its successful" in the subject but in the post you wrote "I do get json error when sending a chat message". A screen-shot please!

Yes, the debug messages are important, but can't make anything out of the Dutch. The question is whether the an error tells mail has not been sent or the e-mail was sent but not arrived. Which one? What is the evidence?
In reply to Visvanath Ratnaweera

Re: not sending mail - alltough eMailTest says its successful

by Thijs Sins -

Hi Visvanath,

Thanks for your help again, very kind indeed!

I have narrowed it down probably to this error message I get. I saw the forum mail task hasn't run, it's a scheduled task. While running the cron task, clicking start now in the scheduled tasks page, I get these error message about the cron task:

"Scheduled task failed: Forum-mails en onderhoudstaken (mod_forum\task\cron_task)"

"Function cron_setup_user() cannot be used in normal requests!"

I tried fiddling with both the cron webserver and the cron command line, but with no luck so far.

Any advice would be welcome.

Kind regards

Thijs

In reply to Thijs Sins

Re: not sending mail - alltough eMailTest says its successful

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
If Moodle's cron job is not running at regular intervals, there won't be forum mails. See https://docs.moodle.org/en/Cron. To find out why, increase the https://docs.moodle.org/en/Debugging level to maximum and post the output here.

You know, you can check Moodle sending mails independently by either requesting a "Forgotton password" via e-mail or writing somebody a message? See https://docs.moodle.org/en/Messaging.
Average of ratings: Useful (1)
In reply to Visvanath Ratnaweera

Re: not sending mail - alltough eMailTest says its successful

by Thijs Sins -
Hi Visvanath,

The puzzle has been solved. I called my domain server company. They figured out Moodle generates an automatic no-reply@mysitename.nl address whilst sending outgoing mail. It doesnt exist, so it came in their spam filter. Now I have made an email alias with no-reply@... and its working like a charm.

Thanks for you help!

Highest regards.
Thijs
Average of ratings: Useful (1)
In reply to Thijs Sins

Re: not sending mail - alltough eMailTest says its successful

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
You see? "Not sending mail" is not the same as "not receiving mail".
:-?

The two cases where Moodle definitely tries to send mail must have narrowed down your search and led to the mainitainers of the mail server.