{"id":9452011356434,"title":"Mailgun New Event: Permanent Failure Integration","handle":"mailgun-new-event-permanent-failure-integration","description":"\u003cbody\u003e\n\n\n \u003cmeta charset=\"UTF-8\"\u003e\n \u003cmeta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"\u003e\n \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"\u003e\n \u003ctitle\u003eMailgun API: Handling Permanent Failures\u003c\/title\u003e\n \u003cstyle\u003e\n body {\n font-family: Arial, sans-serif;\n line-height: 1.6;\n }\n h1,h2 {\n color: #333;\n }\n p {\n text-align: justify;\n }\n code {\n background-color: #f4f4f4;\n padding: 2px 4px;\n border-radius: 4px;\n }\n ul {\n list-style-position: inside;\n }\n \u003c\/style\u003e\n\n\n \u003ch1\u003eUnderstanding the Mailgun API: New Event - Permanent Failure\u003c\/h1\u003e\n \u003cp\u003e\n Mailgun is a powerful email service provider that offers developers an API to send, receive, and track emails effortlessly. One of the many useful endpoints provided by the Mailgun API is the \u003ccode\u003eNew Event: Permanent Failure\u003c\/code\u003e.\n \u003c\/p\u003e\n\n \u003ch2\u003eWhat is a Permanent Failure?\u003c\/h2\u003e\n \u003cp\u003e\n A permanent failure, often referred to as a \"hard bounce,\" occurs when an email cannot be delivered to the recipient's address permanently. This could be due to various reasons, such as an invalid email address, the domain not existing, or the recipient's email server permanently rejecting the email.\n \u003c\/p\u003e\n\n \u003ch2\u003ePurpose of the Permanent Failure Endpoint\u003c\/h2\u003e\n \u003cp\u003e\n The purpose of the \u003ccode\u003eNew Event: Permanent Failure\u003c\/code\u003e endpoint in the Mailgun API is to notify the sender about emails that have failed to deliver permanently. This endpoint allows developers to programmatically handle such events to maintain email deliverability and sender reputation.\n \u003c\/p\u003e\n\n \u003ch2\u003eProblems Solved by the Permanent Failure Endpoint\u003c\/h2\u003e\n \u003cul\u003e\n \u003cli\u003e\n\u003cstrong\u003eMaintaining Email Lists:\u003c\/strong\u003e You can automatically remove or flag invalid email addresses from your mailing lists to avoid sending future messages to those addresses.\u003c\/li\u003e\n \u003cli\u003e\n\u003cstrong\u003eImproving Sender Reputation:\u003c\/strong\u003e By avoiding sending emails to non-existent or rejecting email servers, your sender reputation is protected, which can improve overall email deliverability.\u003c\/li\u003e\n \u003cli\u003e\n\u003cstrong\u003eReporting and Analytics:\u003c\/strong\u003e You can track permanent failure events to better understand your email campaign performance and identify trends or issues with your email list or content.\u003c\/li\u003e\n \u003cli\u003e\n\u003cstrong\u003eAutomated Error Handling:\u003c\/strong\u003e Develop automated responses or actions when permanent failure events are detected, such as notifying end-users or updating CRM data accordingly.\u003c\/li\u003e\n \u003c\/ul\u003e\n\n \u003ch2\u003eImplementing Permanent Failure Handling\u003c\/h2\u003e\n \u003cp\u003e\n To handle permanent failures, one can set up webhooks in Mailgun to listen to \u003ccode\u003eNew Event: Permanent Failure\u003c\/code\u003e notifications. When an event occurs, Mailgun will send a POST request to the webhook URL you have specified with detailed information about the failure. You can process this information to update email lists and take other necessary actions.\n \u003c\/p\u003e\n\n \u003ch2\u003eExample Usage:\u003c\/h2\u003e\n \u003ccode\u003e\n POST \/your-webhook-url \u003cbr\u003e\n { \u003cbr\u003e\n \"event\": \"failed\", \u003cbr\u003e\n \"severity\": \"permanent\", \u003cbr\u003e\n \"reason\": \"bounce\", \u003cbr\u003e\n \"recipient\": \"invalid@email.com\", \u003cbr\u003e\n ... \u003cbr\u003e\n }\n \u003c\/code\u003e\n \u003cp\u003e\n In this example, Mailgun is notifying your webhook about a permanent failure due to a bounced email. Your webhook's handler would process this information and apply your business logic, such as removing the recipient address from your email list.\n \u003c\/p\u003e\n\n \u003ch2\u003eConclusion\u003c\/h2\u003e\n \u003cp\u003e\n The Mailgun API's \u003ccode\u003eNew Event: Permanent Failure\u003c\/code\u003e endpoint is a powerful tool for managing email deliverability and maintaining sender reputation. By leveraging this endpoint, developers can automate the process of cleaning email lists and responding to delivery issues, ensuring effective email communication and reporting.\n \u003c\/p\u003e\n\n\u003c\/body\u003e","published_at":"2024-05-13T14:52:31-05:00","created_at":"2024-05-13T14:52:32-05:00","vendor":"Mailgun","type":"Integration","tags":[],"price":0,"price_min":0,"price_max":0,"available":true,"price_varies":false,"compare_at_price":null,"compare_at_price_min":0,"compare_at_price_max":0,"compare_at_price_varies":false,"variants":[{"id":49121180451090,"title":"Default Title","option1":"Default Title","option2":null,"option3":null,"sku":"","requires_shipping":true,"taxable":true,"featured_image":null,"available":true,"name":"Mailgun New Event: Permanent Failure Integration","public_title":null,"options":["Default Title"],"price":0,"weight":0,"compare_at_price":null,"inventory_management":null,"barcode":null,"requires_selling_plan":false,"selling_plan_allocations":[]}],"images":["\/\/consultantsinabox.com\/cdn\/shop\/files\/10ea2d35b3cfc6e3b6122a9accc4e000_37e5cc67-78ff-41b3-8f56-eee2c96d27f0.png?v=1715629952"],"featured_image":"\/\/consultantsinabox.com\/cdn\/shop\/files\/10ea2d35b3cfc6e3b6122a9accc4e000_37e5cc67-78ff-41b3-8f56-eee2c96d27f0.png?v=1715629952","options":["Title"],"media":[{"alt":"Mailgun Logo","id":39145133015314,"position":1,"preview_image":{"aspect_ratio":0.983,"height":300,"width":295,"src":"\/\/consultantsinabox.com\/cdn\/shop\/files\/10ea2d35b3cfc6e3b6122a9accc4e000_37e5cc67-78ff-41b3-8f56-eee2c96d27f0.png?v=1715629952"},"aspect_ratio":0.983,"height":300,"media_type":"image","src":"\/\/consultantsinabox.com\/cdn\/shop\/files\/10ea2d35b3cfc6e3b6122a9accc4e000_37e5cc67-78ff-41b3-8f56-eee2c96d27f0.png?v=1715629952","width":295}],"requires_selling_plan":false,"selling_plan_groups":[],"content":"\u003cbody\u003e\n\n\n \u003cmeta charset=\"UTF-8\"\u003e\n \u003cmeta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"\u003e\n \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"\u003e\n \u003ctitle\u003eMailgun API: Handling Permanent Failures\u003c\/title\u003e\n \u003cstyle\u003e\n body {\n font-family: Arial, sans-serif;\n line-height: 1.6;\n }\n h1,h2 {\n color: #333;\n }\n p {\n text-align: justify;\n }\n code {\n background-color: #f4f4f4;\n padding: 2px 4px;\n border-radius: 4px;\n }\n ul {\n list-style-position: inside;\n }\n \u003c\/style\u003e\n\n\n \u003ch1\u003eUnderstanding the Mailgun API: New Event - Permanent Failure\u003c\/h1\u003e\n \u003cp\u003e\n Mailgun is a powerful email service provider that offers developers an API to send, receive, and track emails effortlessly. One of the many useful endpoints provided by the Mailgun API is the \u003ccode\u003eNew Event: Permanent Failure\u003c\/code\u003e.\n \u003c\/p\u003e\n\n \u003ch2\u003eWhat is a Permanent Failure?\u003c\/h2\u003e\n \u003cp\u003e\n A permanent failure, often referred to as a \"hard bounce,\" occurs when an email cannot be delivered to the recipient's address permanently. This could be due to various reasons, such as an invalid email address, the domain not existing, or the recipient's email server permanently rejecting the email.\n \u003c\/p\u003e\n\n \u003ch2\u003ePurpose of the Permanent Failure Endpoint\u003c\/h2\u003e\n \u003cp\u003e\n The purpose of the \u003ccode\u003eNew Event: Permanent Failure\u003c\/code\u003e endpoint in the Mailgun API is to notify the sender about emails that have failed to deliver permanently. This endpoint allows developers to programmatically handle such events to maintain email deliverability and sender reputation.\n \u003c\/p\u003e\n\n \u003ch2\u003eProblems Solved by the Permanent Failure Endpoint\u003c\/h2\u003e\n \u003cul\u003e\n \u003cli\u003e\n\u003cstrong\u003eMaintaining Email Lists:\u003c\/strong\u003e You can automatically remove or flag invalid email addresses from your mailing lists to avoid sending future messages to those addresses.\u003c\/li\u003e\n \u003cli\u003e\n\u003cstrong\u003eImproving Sender Reputation:\u003c\/strong\u003e By avoiding sending emails to non-existent or rejecting email servers, your sender reputation is protected, which can improve overall email deliverability.\u003c\/li\u003e\n \u003cli\u003e\n\u003cstrong\u003eReporting and Analytics:\u003c\/strong\u003e You can track permanent failure events to better understand your email campaign performance and identify trends or issues with your email list or content.\u003c\/li\u003e\n \u003cli\u003e\n\u003cstrong\u003eAutomated Error Handling:\u003c\/strong\u003e Develop automated responses or actions when permanent failure events are detected, such as notifying end-users or updating CRM data accordingly.\u003c\/li\u003e\n \u003c\/ul\u003e\n\n \u003ch2\u003eImplementing Permanent Failure Handling\u003c\/h2\u003e\n \u003cp\u003e\n To handle permanent failures, one can set up webhooks in Mailgun to listen to \u003ccode\u003eNew Event: Permanent Failure\u003c\/code\u003e notifications. When an event occurs, Mailgun will send a POST request to the webhook URL you have specified with detailed information about the failure. You can process this information to update email lists and take other necessary actions.\n \u003c\/p\u003e\n\n \u003ch2\u003eExample Usage:\u003c\/h2\u003e\n \u003ccode\u003e\n POST \/your-webhook-url \u003cbr\u003e\n { \u003cbr\u003e\n \"event\": \"failed\", \u003cbr\u003e\n \"severity\": \"permanent\", \u003cbr\u003e\n \"reason\": \"bounce\", \u003cbr\u003e\n \"recipient\": \"invalid@email.com\", \u003cbr\u003e\n ... \u003cbr\u003e\n }\n \u003c\/code\u003e\n \u003cp\u003e\n In this example, Mailgun is notifying your webhook about a permanent failure due to a bounced email. Your webhook's handler would process this information and apply your business logic, such as removing the recipient address from your email list.\n \u003c\/p\u003e\n\n \u003ch2\u003eConclusion\u003c\/h2\u003e\n \u003cp\u003e\n The Mailgun API's \u003ccode\u003eNew Event: Permanent Failure\u003c\/code\u003e endpoint is a powerful tool for managing email deliverability and maintaining sender reputation. By leveraging this endpoint, developers can automate the process of cleaning email lists and responding to delivery issues, ensuring effective email communication and reporting.\n \u003c\/p\u003e\n\n\u003c\/body\u003e"}