{"id":14923,"date":"2014-07-24T19:29:09","date_gmt":"2014-07-24T13:59:09","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=14923"},"modified":"2024-01-02T17:50:04","modified_gmt":"2024-01-02T12:20:04","slug":"email-tracking-using-mailgun-with-grails-application","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/email-tracking-using-mailgun-with-grails-application\/","title":{"rendered":"Email Tracking using MailGun with Grails application"},"content":{"rendered":"<p>Many times we need to track whether the email is open\/deliver\/read by users, sent from our application. After analyzing, I concluded that MailGun provides email tracking services that i used  with my grails application and thought it worth sharing.<\/p>\n<p>There are two ways to send messages using MailGun:<\/p>\n<p>#1. HTTP API<br \/>\n#2. SMTP<\/p>\n<p>I have used HTTP API and MailGun uses Jersey Request Builder.So, add following dependency:<\/p>\n<p>[java]<br \/>\ncompile &quot;:jersey-request-builder:1.2.1&quot;<br \/>\n[\/java]<\/p>\n<p>The steps involved in using MailGun by Rackspace in our grails application are as:-<\/p>\n<p>#1.SignUp With MailGun:<\/p>\n<p>SignUp with Mailgun <a title=\"Here\" href=\"https:\/\/mailgun.com\/signup\" target=\"_blank\" rel=\"noopener\">HERE<\/a> and you will get the following code.<\/p>\n<p>[java]<br \/>\npublic static ClientResponse SendSimpleMessage() {<br \/>\n    Client client = Client.create();<br \/>\n    client.addFilter(new HTTPBasicAuthFilter(&quot;api&quot;,<br \/>\n                &quot;${YOUR_API_KEY}&quot;));<br \/>\n    WebResource webResource =<br \/>\n        client.resource(&quot;https:\/\/api.mailgun.net\/v2\/${YOUR_MAILGUN_SUB_DOMAIN}\/messages&quot;);<br \/>\n    MultivaluedMapImpl formData = new MultivaluedMapImpl();<br \/>\n    formData.add(&quot;from&quot;, &quot;Mailgun Sandbox &lt;postmaster@${YOUR_MAILGUN_SUB_DOMAIN}&gt;&quot;);<br \/>\n    formData.add(&quot;to&quot;, &quot;${EMAIL_ID_YOU_WANT_TO_SEND_TO}&quot;);<br \/>\n    formData.add(&quot;subject&quot;, &quot;Hello ${ACCOUNT_NAME_YOU_REGISTERED_WITH}&quot;);<br \/>\n    formData.add(&quot;text&quot;, &quot;Congratulations ${ACCOUNT_NAME_YOU_REGISTERED_WITH}, you just sent an email with Mailgun!  You are truly awesome!  You can see a record of this email in your logs: https:\/\/mailgun.com\/cp\/log .  You can send up to 300 emails\/day from this sandbox server.  Next, you should add your own domain so you can send 10,000 emails\/month for free.&quot;);<br \/>\n    return webResource.type(MediaType.APPLICATION_FORM_URLENCODED).<br \/>\n                                                post(ClientResponse.class, formData);<br \/>\n}<br \/>\n[\/java]<\/p>\n<p>#2.Log In to MailGun <a title=\"Here\" href=\"https:\/\/mailgun.com\/sessions\/new\" target=\"_blank\" rel=\"noopener\">here<\/a> and go to Logs section.And enter a call back url on which mailgun let&#8217;s you know about Delivery of messages and also you can a enter a call back for failed messages, as can be seen in following image:<\/p>\n<p><img decoding=\"async\" src=\"\/blog\/wp-ttn-blog\/uploads\/2024\/01\/MailDelievryCallBack_ljiwea.png\" alt=\"ForMailGunDelivery CallBack\" \/><\/p>\n<p>#3.Similary go to Tracking section.And enter a call back url on which mailgun let&#8217;s you know about Opens event of messages and also you can a enter a call back for Clicks event messages, as can be seen in following image:<\/p>\n<p><img decoding=\"async\" src=\"\/blog\/wp-ttn-blog\/uploads\/2024\/01\/MailOpenedCallBack_aeuei6.png\" alt=\"ForMailGunOpenedCallBack\" \/><\/p>\n<p>#4.Add following actions to send mails through MailGun and to handle callBacks provided to MailGun.<\/p>\n<p>a) action to send mail-<\/p>\n<p>[java]<br \/>\n  def sendSimpleMessage() {<br \/>\n        log.debug &quot;::::Exceuting mail::::&quot;<br \/>\n        Client client = Client.create();<br \/>\n        client.addFilter(new HTTPBasicAuthFilter(&quot;api&quot;,<br \/>\n                &quot;${grailsApplication.config.mailGun.api}&quot;));<br \/>\n        WebResource webResource =<br \/>\n                client.resource(&quot;${grailsApplication.config.mailGun.webResource}&quot;);<br \/>\n        MultivaluedMapImpl formData = new MultivaluedMapImpl();<br \/>\n        formData.add(&quot;from&quot;, &quot;${grailsApplication.config.mailGun.mail.from}&quot;);<br \/>\n        formData.add(&quot;to&quot;, &quot;${EMAIL_ID_YOU_WANT_TO_SEND_TO}&quot;);<br \/>\n        formData.add(&quot;subject&quot;, &quot;Hello MediaIQ&quot;);<br \/>\n        formData.add(&quot;text&quot;, &quot;Congratulations, you just sent an email with Mailgun!&quot;);<br \/>\n        \/\/use html instead text for sending html content<br \/>\n        formData.add(&quot;o:tracking&quot;, true);<br \/>\n        \/\/Set this to true to track opens event<br \/>\n        webResource.type(MediaType.APPLICATION_FORM_URLENCODED).<br \/>\n                post(ClientResponse.class, formData);<br \/>\n        render &quot;success&quot;<br \/>\n    }<br \/>\n[\/java]<\/p>\n<p>b) action to handle delivery call back-<\/p>\n<p>[java]<br \/>\n    def mailDeliveryCallBack() {<br \/>\n        boolean isMailSent = false<br \/>\n        List headerData = (JSON.parse(params.get(&quot;message-headers&quot;).toString())) as List<br \/>\n        headerData.each { List header -&gt;<br \/>\n            if (header[0] == &quot;Received&quot;) {<br \/>\n                isMailSent = true<br \/>\n              } else if (header[0] == &quot;To&quot;) {<br \/>\n                User user = User.findByEmail(header[1].toString())<br \/>\n                user.isMailSent = true<br \/>\n                user.save()<br \/>\n              }<br \/>\n        }<br \/>\n    }<br \/>\n[\/java]<\/p>\n<p>b) action to handle opens call back-<\/p>\n<p>[java]<br \/>\n    def mailOpenedCallBack() {<br \/>\n        boolean isMailOpened = false<br \/>\n        isMailOpened = params.get(&quot;event&quot;).toString().equals(&quot;opened&quot;)<br \/>\n        User user = User.findByEmail(params.get(&quot;recipient&quot;).toString())<br \/>\n        user.isMailOpened = isMailOpened<br \/>\n        user.save()<br \/>\n    }<br \/>\n}<br \/>\n[\/java]<\/p>\n<p>This worked for me.<br \/>\nHope it helps.<\/p>\n<p>Useful Links:<\/p>\n<p><a title=\"http:\/\/documentation.mailgun.com\/user_manual.html\" href=\"http:\/\/documentation.mailgun.com\/user_manual.html\" target=\"_blank\" rel=\"noopener\">http:\/\/documentation.mailgun.com\/user_manual.html<\/a><\/p>\n<p>Cheers!!!<br \/>\nVivek Garg<br \/>\nvivek.garg@intelligrape.com<br \/>\n<a title=\"www.intelligrape.com\" href=\"http:\/\/www.tothenew.com\/blog\/\" target=\"_blank\" rel=\"noopener\">www.intelligrape.com<\/a><br \/>\nMy LinkedIn<br \/>\n<a title=\"MORE BLOGS BY ME\" href=\"http:\/\/www.tothenew.com\/blog\/author\/vivek-garg\/\" target=\"_blank\" rel=\"noopener\">MORE BLOGS BY ME<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Many times we need to track whether the email is open\/deliver\/read by users, sent from our application. After analyzing, I concluded that MailGun provides email tracking services that i used with my grails application and thought it worth sharing. There are two ways to send messages using MailGun: #1. HTTP API #2. SMTP I have [&hellip;]<\/p>\n","protected":false},"author":69,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":9,"footnotes":""},"categories":[7],"tags":[4840,1486,1487],"class_list":["post-14923","post","type-post","status-publish","format-standard","hentry","category-grails","tag-grails","tag-mailgun","tag-mailgun-api"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"Many times we need to track whether the email is open\/deliver\/read by users, sent from our application. After analyzing, I concluded that MailGun provides email tracking services that i used with my grails application and thought it worth sharing. There are two ways to send messages using MailGun: #1. HTTP API #2. SMTP I have\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Vivek Garg\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.tothenew.com\/blog\/email-tracking-using-mailgun-with-grails-application\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"Email Tracking using MailGun with Grails application | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"Many times we need to track whether the email is open\/deliver\/read by users, sent from our application. After analyzing, I concluded that MailGun provides email tracking services that i used with my grails application and thought it worth sharing. There are two ways to send messages using MailGun: #1. HTTP API #2. SMTP I have\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.tothenew.com\/blog\/email-tracking-using-mailgun-with-grails-application\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Email Tracking using MailGun with Grails application | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Many times we need to track whether the email is open\/deliver\/read by users, sent from our application. After analyzing, I concluded that MailGun provides email tracking services that i used with my grails application and thought it worth sharing. There are two ways to send messages using MailGun: #1. HTTP API #2. SMTP I have\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/email-tracking-using-mailgun-with-grails-application\\\/#article\",\"name\":\"Email Tracking using MailGun with Grails application | TO THE NEW Blog\",\"headline\":\"Email Tracking using MailGun with Grails application\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vivek-garg\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"\\\/blog\\\/wp-ttn-blog\\\/uploads\\\/2024\\\/01\\\/MailDelievryCallBack_ljiwea.png\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/email-tracking-using-mailgun-with-grails-application\\\/#articleImage\"},\"datePublished\":\"2014-07-24T19:29:09+05:30\",\"dateModified\":\"2024-01-02T17:50:04+05:30\",\"inLanguage\":\"en-US\",\"commentCount\":1,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/email-tracking-using-mailgun-with-grails-application\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/email-tracking-using-mailgun-with-grails-application\\\/#webpage\"},\"articleSection\":\"Grails, Grails, MailGun, MailGun API\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/email-tracking-using-mailgun-with-grails-application\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"name\":\"Grails\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"position\":2,\"name\":\"Grails\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/email-tracking-using-mailgun-with-grails-application\\\/#listItem\",\"name\":\"Email Tracking using MailGun with Grails application\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/email-tracking-using-mailgun-with-grails-application\\\/#listItem\",\"position\":3,\"name\":\"Email Tracking using MailGun with Grails application\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"name\":\"Grails\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vivek-garg\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vivek-garg\\\/\",\"name\":\"Vivek Garg\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/email-tracking-using-mailgun-with-grails-application\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/75adc3f5c0b8ea43cf85b5659848287879d4138d2a789102d95d2347b3dfdeb4?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Vivek Garg\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/email-tracking-using-mailgun-with-grails-application\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/email-tracking-using-mailgun-with-grails-application\\\/\",\"name\":\"Email Tracking using MailGun with Grails application | TO THE NEW Blog\",\"description\":\"Many times we need to track whether the email is open\\\/deliver\\\/read by users, sent from our application. After analyzing, I concluded that MailGun provides email tracking services that i used with my grails application and thought it worth sharing. There are two ways to send messages using MailGun: #1. HTTP API #2. SMTP I have\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/email-tracking-using-mailgun-with-grails-application\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vivek-garg\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vivek-garg\\\/#author\"},\"datePublished\":\"2014-07-24T19:29:09+05:30\",\"dateModified\":\"2024-01-02T17:50:04+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Email Tracking using MailGun with Grails application | TO THE NEW Blog","description":"Many times we need to track whether the email is open\/deliver\/read by users, sent from our application. After analyzing, I concluded that MailGun provides email tracking services that i used with my grails application and thought it worth sharing. There are two ways to send messages using MailGun: #1. HTTP API #2. SMTP I have","canonical_url":"https:\/\/www.tothenew.com\/blog\/email-tracking-using-mailgun-with-grails-application\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.tothenew.com\/blog\/email-tracking-using-mailgun-with-grails-application\/#article","name":"Email Tracking using MailGun with Grails application | TO THE NEW Blog","headline":"Email Tracking using MailGun with Grails application","author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/vivek-garg\/#author"},"publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"\/blog\/wp-ttn-blog\/uploads\/2024\/01\/MailDelievryCallBack_ljiwea.png","@id":"https:\/\/www.tothenew.com\/blog\/email-tracking-using-mailgun-with-grails-application\/#articleImage"},"datePublished":"2014-07-24T19:29:09+05:30","dateModified":"2024-01-02T17:50:04+05:30","inLanguage":"en-US","commentCount":1,"mainEntityOfPage":{"@id":"https:\/\/www.tothenew.com\/blog\/email-tracking-using-mailgun-with-grails-application\/#webpage"},"isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/email-tracking-using-mailgun-with-grails-application\/#webpage"},"articleSection":"Grails, Grails, MailGun, MailGun API"},{"@type":"BreadcrumbList","@id":"https:\/\/www.tothenew.com\/blog\/email-tracking-using-mailgun-with-grails-application\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.tothenew.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/grails\/#listItem","name":"Grails"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/grails\/#listItem","position":2,"name":"Grails","item":"https:\/\/www.tothenew.com\/blog\/category\/grails\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/email-tracking-using-mailgun-with-grails-application\/#listItem","name":"Email Tracking using MailGun with Grails application"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/email-tracking-using-mailgun-with-grails-application\/#listItem","position":3,"name":"Email Tracking using MailGun with Grails application","previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/grails\/#listItem","name":"Grails"}}]},{"@type":"Organization","@id":"https:\/\/www.tothenew.com\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/www.tothenew.com\/blog\/"},{"@type":"Person","@id":"https:\/\/www.tothenew.com\/blog\/author\/vivek-garg\/#author","url":"https:\/\/www.tothenew.com\/blog\/author\/vivek-garg\/","name":"Vivek Garg","image":{"@type":"ImageObject","@id":"https:\/\/www.tothenew.com\/blog\/email-tracking-using-mailgun-with-grails-application\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/75adc3f5c0b8ea43cf85b5659848287879d4138d2a789102d95d2347b3dfdeb4?s=96&d=mm&r=g","width":96,"height":96,"caption":"Vivek Garg"}},{"@type":"WebPage","@id":"https:\/\/www.tothenew.com\/blog\/email-tracking-using-mailgun-with-grails-application\/#webpage","url":"https:\/\/www.tothenew.com\/blog\/email-tracking-using-mailgun-with-grails-application\/","name":"Email Tracking using MailGun with Grails application | TO THE NEW Blog","description":"Many times we need to track whether the email is open\/deliver\/read by users, sent from our application. After analyzing, I concluded that MailGun provides email tracking services that i used with my grails application and thought it worth sharing. There are two ways to send messages using MailGun: #1. HTTP API #2. SMTP I have","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.tothenew.com\/blog\/email-tracking-using-mailgun-with-grails-application\/#breadcrumblist"},"author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/vivek-garg\/#author"},"creator":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/vivek-garg\/#author"},"datePublished":"2014-07-24T19:29:09+05:30","dateModified":"2024-01-02T17:50:04+05:30"},{"@type":"WebSite","@id":"https:\/\/www.tothenew.com\/blog\/#website","url":"https:\/\/www.tothenew.com\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"Email Tracking using MailGun with Grails application | TO THE NEW Blog","og:description":"Many times we need to track whether the email is open\/deliver\/read by users, sent from our application. After analyzing, I concluded that MailGun provides email tracking services that i used with my grails application and thought it worth sharing. There are two ways to send messages using MailGun: #1. HTTP API #2. SMTP I have","og:url":"https:\/\/www.tothenew.com\/blog\/email-tracking-using-mailgun-with-grails-application\/","og:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Email Tracking using MailGun with Grails application | TO THE NEW Blog","twitter:description":"Many times we need to track whether the email is open\/deliver\/read by users, sent from our application. After analyzing, I concluded that MailGun provides email tracking services that i used with my grails application and thought it worth sharing. There are two ways to send messages using MailGun: #1. HTTP API #2. SMTP I have","twitter:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"14923","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-30 07:59:33","updated":"2024-02-29 10:16:44","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\/category\/grails\/\" title=\"Grails\">Grails<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tEmail Tracking using MailGun with Grails application\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.tothenew.com\/blog"},{"label":"Grails","link":"https:\/\/www.tothenew.com\/blog\/category\/grails\/"},{"label":"Email Tracking using MailGun with Grails application","link":"https:\/\/www.tothenew.com\/blog\/email-tracking-using-mailgun-with-grails-application\/"}],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/14923","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/69"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=14923"}],"version-history":[{"count":1,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/14923\/revisions"}],"predecessor-version":[{"id":59902,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/14923\/revisions\/59902"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=14923"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=14923"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=14923"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}