# Bounces & Sendgrid

**URL:** <https://forum.mautic.org/t/bounces-sendgrid/5777>\
**Category:** Product Support\
**Created:** [March 15, 2016, 6:44pm UTC](https://forum.mautic.org/t/bounces-sendgrid/5777 "2016-03-15T18:44:37Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![onyxchase](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/onyxchase/32/67_2.png) [@onyxchase](https://forum.mautic.org/u/onyxchase)\
**Post date:** [March 15, 2016, 6:44pm UTC](https://forum.mautic.org/t/bounces-sendgrid/5777/1 "2016-03-15T18:44:37Z")

</div>

Hey guys,  
  
  
  
Just wondering if there was a guide somewhere for setting up bounce detection when sending with Sendgrid.  
  
  
  
Thanks!

---

<div class="post-metadata">

**Author:** ![onyxchase](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/onyxchase/32/67_2.png) [@onyxchase](https://forum.mautic.org/u/onyxchase)\
**Post date:** [March 16, 2016, 12:35am UTC](https://forum.mautic.org/t/bounces-sendgrid/5777/2 "2016-03-16T00:35:48Z")

</div>

I set Sengrid to forward bounces to a special email address that I set up in “Monitored Inbox Settings”, but it’s still not flagging the leads as bounced. I did set up the cron as followed:

\*/5 \* \* \* \* /usr/bin/php /home/XXXXXX/public\_html/crm/app/console mautic:leadlists:update --env=prod \>/dev/null 2\>&1

Not sure what else to do.

---

<div class="post-metadata">

**Author:** ![onyxchase](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/onyxchase/32/67_2.png) [@onyxchase](https://forum.mautic.org/u/onyxchase)\
**Post date:** [March 16, 2016, 1:19am UTC](https://forum.mautic.org/t/bounces-sendgrid/5777/3 "2016-03-16T01:19:10Z")

</div>

It looks like the bounces forwarded by Sendgrid aren’t being recognized by Mautic. This is what happens after receiving a bounce notification from Sendgrid:

# php app/console mautic:fetch:email

1 emails processed for {localhost:993/imap/ssl/novalidate-cert}INBOX\_bounces@XXXX.com

# php app/console mautic:leadlists:update

Rebuilding leads for list 1  
0 total lead(s) to be added in batches of 300  
total lead(s) to be removed in batches of 300  
0 lead(s) affected

Rebuilding leads for list 2  
0 total lead(s) to be added in batches of 300  
0 total lead(s) to be removed in batches of 300  
0 lead(s) affected

---

<div class="post-metadata">

**Author:** ![onyxchase](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/onyxchase/32/67_2.png) [@onyxchase](https://forum.mautic.org/u/onyxchase)\
**Post date:** [March 15, 2016, 6:44pm UTC](https://forum.mautic.org/t/bounces-sendgrid/5777/4 "2016-03-15T18:44:37Z")

</div>

Hey guys,

Just wondering if there was a guide somewhere for setting up bounce detection when sending with Sendgrid.

Thanks!

---

<div class="post-metadata">

**Author:** ![nmanley](https://avatars.discourse-cdn.com/v4/letter/n/ea5d25/32.png) [@nmanley](https://forum.mautic.org/u/nmanley)\
**Post date:** [March 15, 2016, 8:59pm UTC](https://forum.mautic.org/t/bounces-sendgrid/5777/5 "2016-03-15T20:59:48Z")

</div>

Sendgrid I believe allows you to set your bounceback monitored email address. I know you can configure monitored address’s in Configuration -\> Email Settings -\> Monitored Inbox Settings.

I did a quick search, but all I found was API documentation for sendgrid.

Good luck.

---

<div class="post-metadata">

**Author:** ![Huckleberry](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/huckleberry/32/535_2.png) [@Huckleberry](https://forum.mautic.org/u/Huckleberry)\
**Post date:** [October 4, 2017, 3:03pm UTC](https://forum.mautic.org/t/bounces-sendgrid/5777/6 "2017-10-04T15:03:08Z")

</div>

+1, would like a solution to this as well.

---

<div class="post-metadata">

**Author:** ![masidus](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/masidus/32/878_2.png) [@masidus](https://forum.mautic.org/u/masidus)\
**Post date:** [October 14, 2019, 7:49pm UTC](https://forum.mautic.org/t/bounces-sendgrid/5777/7 "2019-10-14T19:49:43Z")

</div>

Apologies for bumping an ancient thread but I can’t find an answer anywhere - did anyone ever find a fix or a workaround for this?

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [October 16, 2019, 12:34pm UTC](https://forum.mautic.org/t/bounces-sendgrid/5777/8 "2019-10-16T12:34:14Z")

</div>

Did you take a look at the documentation here: [https://www.mautic.org/docs/en/emails/bounce\_management.html](https://www.mautic.org/docs/en/emails/bounce_management.html)? It does mention Sendgrid with some steps to set things up.

---

<div class="post-metadata">

**Author:** ![masidus](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/masidus/32/878_2.png) [@masidus](https://forum.mautic.org/u/masidus)\
**Post date:** [October 16, 2019, 1:34pm UTC](https://forum.mautic.org/t/bounces-sendgrid/5777/9 "2019-10-16T13:34:13Z")

</div>

Hey Ruth,

Thank you very much for your reply!

I have made multiple posts about this over the past couple weeks to no avail unfortunately to the point where I am now completely stuck as to why this doesn’t work.

It is listed on the bounce management page obviously suggesting that it has been tested and is functional however I haven’t had one person turn round and say it works to me yet.

I have posted two threads in the forums thus far and posted a bug report on github.

- Github Issue - [https://github.com/mautic/mautic/issues/7951](https://github.com/mautic/mautic/issues/7951)
- Bounced email Sendgrid into Mautic - [Bounced email Sendgrid into mautic](https://forum.mautic.org/t/bounced-email-sendgrid-into-mautic/11356)
- Sendgrid Webhook - Bounce Management Not Working - [Sendgrid Webhook - Bounce Management Not Working](https://forum.mautic.org/t/sendgrid-webhook-bounce-management-not-working/11275)

I am completely at a loss for how this works now and any help would be hugely appreciated!

@silavapi - if you could forward this to the appropriate channels and make the issue known that would be amazing as I have been working on this for days and the monitored inbox is far less reliable than the webhook.

Please let me know if you need anymore details of my install, filesystem, logs etc and I will be more than happy to provide this info - this is the last hurdle I’m facing to have a 100 % self sufficient Mautic install so am anxious to get this fixed!

Thank you guys, much appreciated!

My Mautic Version - 2.15.3  
PHP - 7.2.22

- My mautic instance is running on ‘[mautic.mydomain.com](http://mautic.mydomain.com)’
- My VPS is hosted with RunCloud, root directory filepath is ‘/home/runcloud/webapps/Mautic’

I do genuinely wonder now if it’s because of the filepath or the fact that Mautic is installed in a subdirectory but these are still just guesses!

---

<div class="post-metadata">

**Author:** ![masidus](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/masidus/32/878_2.png) [@masidus](https://forum.mautic.org/u/masidus)\
**Post date:** [October 16, 2019, 5:23pm UTC](https://forum.mautic.org/t/bounces-sendgrid/5777/10 "2019-10-16T17:23:45Z")

</div>

Spoke to Sendgrid customer support and part of their reply was -

#### Regarding posting to the endpoint: I’m only seeing one attempt from our side on 10/12/19 at 1:45:57.884 PM MDT. This was a successful post. You should be good to go once you enable the webhook again and send more mail.

This matches up to the data in my Sendgrid logs so I know for a fact that the data is being sent to Mautic, therefore I can only conclude that it is a processing issue on Mautics side.

---

<div class="post-metadata">

**Author:** ![bill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/bill/32/694_2.png) [@bill](https://forum.mautic.org/u/bill)\
**Post date:** [October 11, 2019, 11:17am UTC](https://forum.mautic.org/t/bounces-sendgrid/5777/11 "2019-10-11T11:17:10Z")

</div>

Hello Mauticians  
I want to have my bounced emails of sendgrid into mautic do you have a guide for this ?

---

<div class="post-metadata">

**Author:** ![kuzmany](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/kuzmany/32/390_2.png) [@kuzmany](https://forum.mautic.org/u/kuzmany)\
**Post date:** [October 12, 2019, 2:13pm UTC](https://forum.mautic.org/t/bounces-sendgrid/5777/12 "2019-10-12T14:13:35Z")

</div>

[https://www.mautic.org/docs/en/emails/bounce\_management.html](https://www.mautic.org/docs/en/emails/bounce_management.html)

---

<div class="post-metadata">

**Author:** ![masidus](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/masidus/32/878_2.png) [@masidus](https://forum.mautic.org/u/masidus)\
**Post date:** [October 12, 2019, 8:00pm UTC](https://forum.mautic.org/t/bounces-sendgrid/5777/13 "2019-10-12T20:00:30Z")

</div>

The webhook still doesn’t work as of 2.15.3 unlese there is something wrong with my setup.

I have gone through all the steps listed, have tested the headers in Sendgrid and the test data is being sent by Sendgrid so that’s all fine.

When I check the callback URL ([http://your.mautic.com/mailer/sendgrid\_api/callback](http://your.mautic.com/mailer/sendgrid_api/callback)) I get the ‘success’ message in the top left.

I have had bounces come through which are listed on Sendgrid, yet the contacts are still not being updated in Mautic (I assume to ‘Do Not Contact’), which I have checked thoroughly to no avail.

My mautic instance is installed in a subdomain ([mautic.mydomain.com](http://mautic.mydomain.com)) and the filepath to the Mautic installation is - /home/runcloud/webapps/Mautic - as I’m using RunCloud as my third-party cPanel for VPS.

Any help would be hugely appreciated as I’ve scoured the internet for hours upon hours and am really struggling to find a solution and it would be incredible if I could get the webhook to work succesfully!

Many thanks!

---

<div class="post-metadata">

**Author:** ![masidus](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/masidus/32/878_2.png) [@masidus](https://forum.mautic.org/u/masidus)\
**Post date:** [October 1, 2019, 6:13pm UTC](https://forum.mautic.org/t/bounces-sendgrid/5777/14 "2019-10-01T18:13:16Z")

</div>

**Your software**  
My Mautic version is: 2.15.0  
My PHP version is: 7.2.22

**Your problem**  
My problem is: I have taken the necessary steps to enable bounce management via the Sendgrid webhook - [https://www.mautic.org/docs/en/emails/bounce\_management.html](https://www.mautic.org/docs/en/emails/bounce_management.html) - and when testing my target URL - [http://mautic.masidus.com/mailer/sendgrid\_api/callback](http://mautic.masidus.com/mailer/sendgrid_api/callback) - I am receiving the ‘success’ message but my contacts are not being marked in anyway, I’m getting no feedback in the logs and I am at a serious loss as to why this is happening!

These errors are showing in the log: There are no errors in the log at all. When I was still getting errors for ignore\_user\_abort variable, every time I would send test data using the option on Sendgrid, I would get a note in the log with the same time just warning that ignore\_user\_abort was disabled for security reasons, meaning Mautic should be receiving the appropriate data but I can’t seem to find it anywhere.

Steps I have tried to fix the problem: Different callback URIs, checking logs, implemented a fix from one of the developers where a string for 2.15.0 was wrong which prompted the original ‘success’ message. I’ve heard that this is an issue for other people and I’m really struggling to find a solution. Had to install 2.15.0 as 2.15.1/2.15.2 were both bugged and the installer never finished, confirmed by other Mauticers and my hosting management provider.

Thank you for your time! 🙂

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [October 17, 2019, 3:50pm UTC](https://forum.mautic.org/t/bounces-sendgrid/5777/15 "2019-10-17T15:50:11Z")

</div>

Hi folks,

I’m moving a bunch of threads to do with SendGrid and bounces into one, so that they aren’t scattered all over the place. Hold on to your hats 🤠

---

<div class="post-metadata">

**Author:** ![masidus](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/masidus/32/878_2.png) [@masidus](https://forum.mautic.org/u/masidus)\
**Post date:** [October 17, 2019, 3:58pm UTC](https://forum.mautic.org/t/bounces-sendgrid/5777/16 "2019-10-17T15:58:37Z")

</div>

Ruth you’re a diamond, thank you so much for your reply and you’re the first person to take definitive action on this so huge appreciation for that!

\*_grasps hat firmly in both hands_

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [October 17, 2019, 4:00pm UTC](https://forum.mautic.org/t/bounces-sendgrid/5777/17 "2019-10-17T16:00:12Z")

</div>

I’ve now merged all the relevant threads into this post, so hopefully we can get everybody talking in the same place! The Github issue was also mentioned above so I’ve added this forum thread as a comment there in case any devs pick it up.

I’ll take a look and see if I can replicate the issue once I’m done with the PR test I’m just doing. Thanks for all the detailed descriptions of what you’ve tried so far!

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [October 17, 2019, 4:17pm UTC](https://forum.mautic.org/t/bounces-sendgrid/5777/18 "2019-10-17T16:17:55Z")

</div>

Are you using the API or SMTP settings in your global config in Mautic? Just so I can ensure my setup mirrors yours 🙂

---

<div class="post-metadata">

**Author:** ![Yosu\_Cadilla](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/yosu_cadilla/32/6206_2.png) [@Yosu\_Cadilla](https://forum.mautic.org/u/Yosu_Cadilla)\
**Post date:** [October 18, 2019, 12:28am UTC](https://forum.mautic.org/t/bounces-sendgrid/5777/19 "2019-10-18T00:28:49Z")

</div>

@silavapi Thank you for keeping an eye on this issue.  
Here’s another Sendgrid API issues you might want to add to the list:

> <https://github.com/mautic/mautic/issues/7892>
>
> Bug Description
> Using Sendgrid API to send emails (no queue).
> Emails are delivered and opens are tracked.
> Clicks on emails links are not tracked.
> Mautic...

---

<div class="post-metadata">

**Author:** ![masidus](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/masidus/32/878_2.png) [@masidus](https://forum.mautic.org/u/masidus)\
**Post date:** [October 18, 2019, 12:37am UTC](https://forum.mautic.org/t/bounces-sendgrid/5777/20 "2019-10-18T00:37:09Z")

</div>

Hi Ruth,

Using the Sendgrid API for sending, if you need any other details feel free to hit me up!

Thank you

[Next page](https://forum.mautic.org/t/bounces-sendgrid/5777.md?page=2)
