Does Mauic do any basic checking for a valid Email?

Your software
My Mautic version is:3.3.
My PHP version is:7.3
My Database type and version is:Mysql

Your problem
My problem is: Just wondering if Mautic does any sort of basic email validation or is that something we have to add… The reason i ask is i can feed it anything and its fine… The only thing i have seen it reject is is the email a dupe… and it will complain abaout that but the following emails go right to the db just fine…
tonk@donk.cucumber
jack@ poppyhear. crucifix
in other words no matter what you enter it just fine… as long as it not a dupe…
Thanks for a quick response…I can add my own, but was just wondering if it has any validation at all outside dupe email…

It may reject more when it tries to do an internal job but I need it to clean them up on arrival…
not next week on Sunday. I don;t want that junk in my db…and i immediatley want to cancel their registration based on a lie at signing up… Dont need them no more…

These errors are showing in the log:

Steps I have tried to fix the problem:

I had problems with the email check in swiftmail that mautic uses and did a hack to get rid of it. This is a terrible idea, and I would be interested in a better solution.

Vim /var/www/html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php

Line 150 original

/**
 * Throws an Exception if the address passed does not comply with RFC 2822.
 *
 * @param string $address
 *
 * @throws Swift_RfcComplianceException If address is invalid
 */
private function assertValidAddress($address)
{
    if (!$this->emailValidator->isValid($address, new RFCValidation())) {
        throw new Swift_RfcComplianceException(
            'Address set in PathHeader does not comply with addr-spec of RFC 2822.'
        );
    }
}

Line 150 fixed (check disabled)

/**
 * Throws an Exception if the address passed does not comply with RFC 2822.
 *
 * @param string $address
 *
 * @throws Swift_RfcComplianceException If address is invalid
 */
private function assertValidAddress($address)
{
    if (0 === $this->emailValidator->isValid($address, new RFCValidation())) {
        throw new Swift_RfcComplianceException(
            'Address set in PathHeader does not comply with addr-spec of RFC 2822.'
        );
    }
}

Sorry Robert I can’t help you with your problem… But was hoping to get some information on whether or not Mautic does any type of Email Validation at all as mine does not seem to do any at all…

hey @tommytx123 I think Mautic does very basic email validation in terms of making sure the email syntax is correct. No more than that to my knowledge

Thanks mikew but wouldn’t you want to know for sure… do you have a simple form attached to Mautic that you know for sure you did not set email validation on specifically… If so could you submit a fake lead and use something like… . toeman with buddy.com and see if it goes into your database… mine works fine with things like "betterteam from south carolina. with no @ symbol… that is real bad… appreciate it if can can test that… surely I am not the only one…
But my responses suggest that i am the only one or no one else cares…

You can create a campaign and use the Has Valid Email condition to push contacts through validation. I use it and add a tag that the email has been validated if it passes and moved to a segment for correction or deletion if it does not.

The last time I researched this the “validation” it does is checking for mx records and if the SMTP server gives a valid reply.

3 Likes

Hi @tommytx123,
not sure I get your point. Mautic does a formal verification of the email syntax, but does not actually try to test the address.

  • Are you saying that the email syntax verification has glitches?
  • Or are you not seeing it at all? (Maybe you did not set the form field type to “email”?)
  • If you are looking for an active validation that an email exists: There are multiple external solutions for that (but currently none that acts at time of form submission)

Ekke Guembel

Mautic Open Source Project, Team Lead "Community"
Mail: ekke.guembel@mautic.org
Phone: +49 511 6262 9311
Profile & Social Media: Leuchtfeuer.com/ekke
Mautic Podcast: mauticast.de (DE) / mauticast.com (EN)

Thanks Ekke you hit the nail on the head… the field had been identified as type=text all is well thanks.

1 Like

To add to this, not sure on v3, but in v4 you can use Amazon SNS to check for bounced emails. This will automatically add them to Do Not Contact and you can build a segment of Bounced users that you can clean up periodically.

I run all my email addressed thru an integromat flow that validates them with Zerobounce, then updates Mautic with the results of that validation.