Published on 2020-02-26· Updated on 2023-09-06
Mautic being an opensource marketing solution provides you with various features such as email organization through segmentation and sending targeted emails through campaigns with email monitoring. In order to comprehend the impact of your campaign, you need to track how much of your sent emails are being successfully sent and how many emails are being dropped. You can do this by checking bounced emails in your campaign.
Reasons for getting an email bounce notification can be many; from email address being changed, a domain has changed, the recipient's mailbox is full, etc.
Types of email bounces:
With this, we can go forward with setting up email bounce filtration in Mautic.
If you haven't yet installed the php-imap extension please follow these instructions for the installation:
$ sudo yum install php-imap // For centos \ RHEL $ sudo apt-get install php7.0-imap // For ubuntu
$ vim /etc/php.ini
extension=imap.so extension=curl.so
$ service restart httpd\apache // For apache $ service restart nginx // For nginx
Since now we have our PHP IMAP extension enabled we can move onward towards setting up our IMAP inbox with Mautic.
Monitored address - The email address you are going to use
IMAP host - The IMAP enabled email server's hostname
Port - Email server connection port [usually 993]
Encryption - Message encryption [usually SSL]
IMAP username - User name of your email account
IMAP password- Password of your email account
You can use Use custom connection settings? option too, for setting up different email addresses for different Requests.
Note:- By any reason you are not being able to see the Monitored Inbox Settings you can do two things to fix this
// Mautic cache folder /mautic_setup_path/app/cache/
Edit the Cron file and put the following Cron in it.
$ crontab -e
* * * * * php /path/to/mautic/app/console mautic:email:fetch
This segment will be updated when mautic:segments:update Cron is executed
After you set your IMAP server settings, Mautic would be checking for bounce notification emails in your specified directory. To receive these bounce notification emails, you might have to enable this in your email service providers panel.
All you have to do is set the email id which you have specified in the Monitored Inbox Settings to be forwarded the bounce email notifications.
Depending upon the service provider you use you will have to set the webhook to the Mauitc callback URL.
The callback URL would look something like this:
http://<mauic_installation_domain>/mailer/{service-provider-name}/callback
Similar to the IMAP settings you can use this callback URL as a webhook in order to detect bounced emails.
If you are using a custom SMTP service that is not mentioned in the Email service list provided in the [Mail Send Settings] panel, you will not be able to use this. Regardless of that, if you have followed this tutorial until Step 5, you will be able to detect and interact with the bounced email ids into the Bounce segment.
[email protected]
By following this tutorial you are now able to detect and segregate bounced emails from in Mautics email contact list.
Netcorecloud's toolkit is the solution to all your email problems.
Netcore connects & unifies your data across all sources, connects to your marketing channels and provides you with control over AI Powered automation and personalization.
Hitesh Pandey💻
Full Stack Developer, Pepipost
🥑 Developer Evangelist | 🥇Email Geek