Website email acting weird

Hello,

For some reason, the stats shows that my website sends emails to 6 emails (my newsletter list) every HOUR. That’s pretty weird :confused:

Bonus question : Can sending multiple emails in bulk (ex 20-30 emails) can trigger the auto-suspension ? In this case i’d just add all the emails into the recipients !

Bonus question 2 : It also seems that my daily email quota is not reset. Or is it just me misunderstanding time ? xD

Hi @jeuxjeux20!

For some reason, the stats shows that my website sends emails to 6 emails (my newsletter list) every HOUR.

Please check up your site. Make sure nothing sends mails randomly.

Bonus question : Can sending multiple emails in bulk (ex 20-30 emails) can trigger the auto-suspension ? In this case i’d just add all the emails into the recipients !

No, but silently disables mailing feature for your site.

Bonus question 2 : It also seems that my daily email quota is not reset. Or is it just me misunderstanding time ? xD

It should reset after 24hours note that Statistics are not real time. Check back later.

@teodor
Actually, the only thing that sends mails is this code in a login-protected page :

            $pdo = new PDO('mysql:host=localhost;'
                    . 'dbname=xxxxx_datajournaux;charset=utf8', 'xxxxx_admin', 'censored');
        } catch (Exception $exc) {
            die($exc->getTraceAsString()); // Si quelque chose se passe mal, on voit.
        }

        $r = $pdo->prepare('INSERT INTO Journaux (Titre, Contenu) VALUES(:t, :c)');
        $r->execute(array('t' => $_POST['title'], 'c' => $_POST['content']));
        $r->closeCursor();
        $mailRequest = $pdo->query('SELECT Mail, UnsubscribeCode FROM Newsletter');
        while ($result = $mailRequest->fetch()) {
            $to = $result['Mail'];
            $subject = 'Un nouveau journal d\'astrub est paru !';
            $message = '<html><body>Allez-vite lire le journal intitulé "'.$_POST['title'].'" ! <br> <a href="http://lejournaldastrub.tk/selectJournal.php">Cliquez ici</a> voir la liste des journaux.'
                    . '<br><a href="http://lejournaldastrub.tk/newsletter/newsletterUnsubscribe.php?id='.$result['UnsubscribeCode'].'" style="text-align:center; font-size: 0.6em;">Se déinscrire</a></body></html>';
            $headers = 'From: newsletter@lejournaldastrub.tk' . "\r\n" ."Content-Type: text/html; charset=UTF-8". "\r\n" .
                    'X-Mailer: PHP/' . phpversion();
            mail($to, $subject, $message, $headers);
        }
        $mailRequest->closeCursor();

I’ll just make a modification on the $to parameter to send one mail for everyone.

to send one mail for everyone.

How many? If you’re sending emails in bulk to more than 10 addresses them your website may be flagged as spam.

Currently it depends, the newsletter list can grow up if a lot of users joins it. Actually it only has 6 people in it.

Is using Web push notifications also considered as spam too ? If not then I could maybe use it instead of mailing.

No, it’s not considered a spam.

I think one of our mailing servers is temporarily down. Please try again later…

Okay, I’m now using web push notifications to inform my users ! Thank you ! :slight_smile:

1 Like

We’re glad a temporary fix has been found! :blush: