I’ve been trying for more than 2 weeks now to get modx to send emails. It works for a couple of emails that go through then for no apparent reason whatsoever it stops, no errormessages nothing, just the mails stop.
I tried this on a local server, online server, with smtp, without smtp always the same result it works for a couple of mails then it stops.
To be sure I started from scratch installed the latest modx version, installed only formit as package, used the exact example from the docs with exception of the emailaddress.
Results again the same it works for a while then it stops working for no reason.
When I use this simple script it works each time:
<?php
if (mail('[email protected]', 'My Subject', 'My Message')) {
echo("<p>Message successfully sent!</p>");
} else {
echo("<p>Message delivery failed...</p>");
}
So it’s not the server. There is no logic in it. I started all over again and now it doesn’t send emails, so it seems like somehow my server doesn’t send mails coming from modx after a certain amount have been sent while still allowing mails from the simple php script to pass through. That makes no sense but I can’t debug it.
It’d be happy to give someone access to my server to see if I’m doing something wrong as I’m loosing valuable time with it and all suggestions made previously don’t help.
Also using the login snippet or any other add-ons to send mails result in the same behavior.
I went to eat tried again and it’s working again. It seems after some time it’s unblocked again.
Another theory I have is maybe gmail blocks the mails if too many are sent in a short time, but why does it only blocks the mails from modx and not from the mailscript? It’s really crazy.