Download Mailgun Email API
Author: c | 2025-04-24
Learn how to migrate from the Sendgrid email API to the Mailgun Email API with this helpful guide created by Mailgun. Download The Handbook. Mailgun Send Email with Mailgun API on npm Download Counts from npm API. Setup the npm API trigger to run a workflow which integrates with the Mailgun API. Pipedream 39;s
Learn about email automation and Mailgun’s Email API
Mailgun is an email sending service that provides logging and an API to send emails. PowerShell is particularly strong in its ability to use REST API’s. There are many use cases for needing to send emails, but one of the most common is that of sending emails when scripts are completed. This may be for status updates or failures.With that in mind, how do we set up MailGun for use with PowerShell and send emails as we need them? In this article, we will explore this use case and how best to create a simple script to send an email using MailGun.Setting Up MailgunOnce you have created a Mailgun account, there are a few simple steps. Below are the next two steps to configure.Adding your Domain to send email fromRetrieving API KeyAdd a DomainNavigate to Sending → Domains and click on Add New Domain. Create the domain as follows:Image # Expand Upon clicking Add Domain, you will be brought to a screen listing all of the corresponding DNS records that you will need to be entered in whichever DNS provider you have. Once all those settings have been added, and you have verified your DNS settings, we can retrieve the API key.Retrieving the API KeyUnlike many other API’s, Mailgun does not use Tokens, but a single API key for all services. Navigate to Account → Settings and choose API Keys. Click on API Security and view the Private API Key. This will be the key we use to authenticate and Send emails via PowerShell.Creating PowerShell ScriptLike many other API’s we will use the familiar Invoke-RestMethod method to actually create the HTTP call to send the email via API. The authentication method to use is Basic Auth, with the API header key. Additionally, we will create an object to hold our data but pass this in via the Form parameter which is using multi-part/formdata. This is different than other API’s which typically uses JSON.What are the fields that are required and optional? Below we take a look at what is needed, and then what are some of the other available options. More settings are available in the Mailgun API documentation.RequiredFromToSubjectTextOptionalThough we don’t list all of the optional fields here, these are some of the more interesting and useful ones.CC & BCCHTMLattachment (must use multi-part/formdatainline (can be used to send inline images)o:testmode – If set to true, Mailgun will accept the message but it will not be sent. Keep in mind that you are still charged for the message (unless under the free limit).o:deliverytime – If configured, you can set a future delivery time for up to 3 days in advance for the future. Mailgun uses the rfc2822 date format.Finally, let’s create a simple script to send a basic, non-HTML message, using the MailGun API.$APIKey = 'key-asdf887as8fa8df8a7df87sd8f8sa8sd'$Params = @{ "URI" = ' "Form" = @{ "from" = '[email protected]' "to" = '[email protected]' "subject" = 'Test Email' "text" = 'Test Text!' } "Authentication" = 'Basic' "Credential" = (New-Object System.Management.Automation.PSCredential ("api", ($APIKey |beccauwu/dart-mailgun: Send email through Mailgun API - GitHub
The Begin validation button and confirm the intention to perform the validation by clicking Begin. Keep in mind - these validations take some processing time! You'll see the display demonstrating the validations as being in progress. Once complete, just click the Download validations result button.API endpointsPOST - API command used to Submit Job URL: - API command used to Gather Job StatusURL: - API command used to Cancel JobURL: to keep in mindFor successful implementation with your particular use case, make sure to remember the following:Only one job can be processed per account at any given timeThe processing rate of lists can vary depending on list size and system loadFeatures & highlightsIn summary, here's the of options Bulk Validations provides for you:Perform a list-based validation much faster than can be done one-by-oneBoth CSV and JSON versions of processed email addresses availablePerpetually retrievable and parseableOnly three new simple sets of APIs that anyone already oriented with Mailgun's architecture can quickly and readily adoptExisting Mailing Lists uploaded to your Mailgun account are readily able to use - right awayNeed Support?Our Support Team here at Sinch Mailgun is happy to help! Reach out to us in the Support page of your Mailgun Control Panel, and we'll be with you shortly!. Learn how to migrate from the Sendgrid email API to the Mailgun Email API with this helpful guide created by Mailgun. Download The Handbook. Mailgun Send Email with Mailgun API on npm Download Counts from npm API. Setup the npm API trigger to run a workflow which integrates with the Mailgun API. Pipedream 39;sSend email using Python3 and the Mailgun API
In large part to the app’s contact list management capabilities and mail customization features.#12) MailgunBest for small to large businesses.Price: Mailgun will allow you to send 10000 emails per month for free. It has three more pricing plans i.e. Production ($79 per month), Scale ($325 per month), and Enterprise (Get a quote).Mailgun provides solutions for Email marketing, Transactional emails, Email parsing, etc. It provides Email API to help developers integrate email into their apps. You will be able to build your service with an open-source library. It guarantees that the average API response time will be less than 500 ms.Features:Mailgun provides Email API services with features like advanced email analytics, better deliverability, and email parsing & routing features.It provides email validation features like custom grammar checks, validating emails based on billions of sent emails, protecting the list from typos, avoiding high-risk addresses, etc.It provides a powerful sending infrastructure with SMTP integration and a RESTful API.Verdict: Mailgun has good reviews for its email delivery and support services.Website: MailjetBest for small to large businesses.Price: Mailjet offers a free plan that will allow you to send 6000 emails per month. You can choose the number of emails to be sent per month with Basic and Premium plans and the prices will change accordingly.For 30000 emails, the Basic plan will cost you $8.69 per month and the Premium will cost $18.86 per month. You can get a quote for the enterprise plan.Mailjet provides transactional & email marketing solutions. It has features for creating, managing, sending, and optimizing emails. You will get actionable insights through a complete overview of your email performance and real-time monitoring. For better engagement, Mailjet will help you to personalize email templates.Features: Mailjet has an email template gallery and an intuitive drag-and-drop email builder.Its collaboration features will let you work together as a team in real time.It will allow you to lock specific sections of your templates.Subscription forms will help you to grow your email list.Verdict: Mailjet has good reviews for email marketing. The tool has features to help you organize the list and create targeted segments.Website: SendGridBest for small to large businesses.Price: SendGrid offers a free plan that will allow you to send 40000 emails for free for the first month and then 100 emails per day. Essentials 40K plan will cost you $14.95 per month (40000 emails) and the Pro plan will cost you $79.95 per month. You can get a quote for the Premier plan.SendGrid provides the platform for shipping notifications, password resets, email newsletters, and promotional emails. The platform will allow you to add the contacts through CSV upload, Signup forms, and the contacts API. It has functionalities for managing recipients, scheduling, content, and testing.Suggested reading => Best alternatives to SendGridFeatures: Email Marketing has features for automation, design, templates, and statistics.It provides email API with features of Web API, SMTP Service, Transactional email, and Email validation.It provides custom SPF and DKIM record creation to eliminate domain spoofing and phishing emails.Verdict: SendGrid is a cloud-based platform that provides = 'POST'}Invoke-RestMethod @ParamsYou can track this the same as before by navigating to the logs within Mailgun and noting the result of the API call and see that the attachment sent as expected. If you expand the log information, you can see if the attachment was accepted and other details pertaining to the email that was sent.Image # Expand There are a few statuses to watch for, such as Accepted, Delivered, or Opened (if click-tracking is turned on). Ultimately, you are looking for Delivered to make sure the email actually made it.ConclusionMailgun is an invaluable tool for sending emails as it has a generous free limit with logging. This is unusual in other services that offer email sending services. With a robust API and excellent integration into multiple languages, it is an easy choice to integrate into your PowerShell scripts.To take this even further, it would be common to then turn this into a module by wrapping the functionality with validation and error checking. By doing this, you can easily integrate Mailgun into your entire script pipeline and infrastructure. PowerShell 7 makes this process better, by extending the Invoke-RestMethod cmdlet with easy form data handling which in the past used to be troublesome.Related Article:Getting Started with hMailServerSending email using the Mailgun PHP API
OverviewNeed a simple, efficient method to perform email validations on a large scale quickly? Welcome to Bulk Validations!Our Bulk Validation feature provides a simple, easy-to-follow set of steps for validating a large number of email addresses and retrieving the results quickly. From there, you can take proactive steps to protect the reputations of your sending domain(s) and your assigned IPs by removing the invalid email addresses from your mailing lists or contacts. This due diligence, in turn, aids in maintaining an excellent quality of recipients, as well as minimizing bounce and suppression events. We're all about optimizing your sending to help enable the full range of your success!How to use the Bulk Validation API and retrieve the resultsIf utilizing the Bulk Validations feature via the Email Validations API, the steps are as follows:Create a mailing list and upload members; take note of its alias.Submit a POST to the API URL which contains the alias from step 1 (more on this step below).Periodically submit a GET to the same URL to retrieve the download links for the CSV and JSON files.If utilizing the Control Panel, we'll show you how to do this below:First, log in to the Mailgun Control Panel (if you have not already done so).Then, within the left-hand navigation pane, click the Send product and then click the Sending option to expand its list of suboptions.Next, click the Mailing lists suboption and select the intended mailing list.In the Details section and next to the Validate recipient addresses setting, clickHow to use Mailgun’s email validation API
You connect as many email service providers as you want with intelligent email routingSends daily and weekly notification emails so you can keep up with stats and email failures and diagnose issuesUtilize faster and more secure connections with native API integrationsWorks with Amazon SES, Outlook, Gmail/Google Workspace, Mailgun, Brevo, and morePriceFree5. SMTP MailerLike others on this list, SMTP Mailer takes control of the wp_mail function in WordPress and uses SMTP instead.We found that it’s a pretty simple plugin to use. The downside of that is that there aren’t a whole lot of features beyond configuring your site to send emails via SMTP.There’s also no native support for third-party mailer apps like SendLayer, Brevo, Mailgun, and others.Additional FeaturesClaims to work with any plugin that uses wp_mail()Has known compatibility with Contact Form 7, Jetpack Contact Form, and Formidable FormsPriceFreeAnd there you have it. While we still find WP Mail SMTP to be the most user-friendly mailer plugin, especially for beginners, hopefully this post gave you some insight about similar plugins to help you make the best decision for your site.Next, Learn About Email Deliverability Best PracticesIf you’re just getting started with learning about how to improve email deliverability from your website, check out these email deliverability best practices.If you’re looking for the best possible deliverability, note that WP Mail SMTP adds list-unsubscribe headers to all emails sent from WordPress. This is essential, because if your SMTP plugin doesn’t add those headers, you won’t comply with Google’s new sender requirements. We recommend taking a look at these, since it can cause emails to be blocked.Fix Your WordPress Emails NowReady to fix your emails? Get started today with the best WordPress SMTP plugin. If you don’t have the time to fix your emails, you can get full White Glove Setup assistance as an extra purchase, and there’s a 14-day money-back guarantee for all paid plans.If this article helped you out, please follow us on Facebook and Twitter for more WordPress tips and tutorials.. Learn how to migrate from the Sendgrid email API to the Mailgun Email API with this helpful guide created by Mailgun. Download The Handbook. Mailgun Send Email with Mailgun API on npm Download Counts from npm API. Setup the npm API trigger to run a workflow which integrates with the Mailgun API. Pipedream 39;semail - Sending InputStreamSource as attachment with mailGun API in
APIs and flexible email validation features, positions it as a preferred choice for marketers aiming for reach and reliability in their email strategies.Pricing: Send 5,000 emails per month for free for 3 months. Monthly plans start at $35 per month.Pros:Use shared IPs or your own to ensure good deliverability ratesRegular inbox placement tests mean you always know where your emails are landing Detailed analytics to track results for bulk campaigns and individual emailsCons:G2 reviews mention that you need to pay extra for historical reportingSome customers say in their Capterra reviews that it would be helpful if there was a way to create emails in Mailgun, rather than just sending them15. SendGridEmail sending platform combining bulk sending with a more traditional email marketing platformSendGrid, a cloud-based service, offers an SMTP interface, allowing for seamless integration with existing applications. Its robust infrastructure supports high-volume sending, ensuring reliability and scalability.With advanced analytics, SendGrid provides insights into email performance, aiding in optimization efforts. While similar services like Mailchimp offer user-friendly interfaces and marketing automation, SendGrid stands out for developers seeking comprehensive API access and customization. Plus, Sendgrid maintains high deliverability with proactive ISP outreach and reputation monitoring, a critical consideration for businesses aiming to reach large audiences without being flagged as spam.Pricing: Send 100 emails per day for free. Plans start at $15 per month.Pros:Email API and SMTP for bulk and transactional emailingA suite of email marketing tools for creating engaging email templatesDetailed analytics and statistics on email performanceCons:Some customers say that the set up process is complicatedCapterra users say that they’ve had problems with email deliverability and it’s hard to solve the issues once they arise16. Amazon SESLow-cost bulk email service ideal for companies already in the AWS ecosystemAmazon Simple Email Service (SES) is a robust transactional email platform that facilitates high-volume email sending for businesses. Its key features include a flexible IP deployment model and a reputation dashboard for monitoring email sending health. You’ll also find tools to help you easily authenticate your emails with SPF and DKIM to ensure your recipients’ inboxes are always likely to let your emails through.SES is particularly useful for applications requiring reliable delivery of notifications, such as password resets or purchase confirmations. Compared to competitors like SendGrid or Mailgun, SES stands out for its deep integration with AWS services, offering advantages in scalability and cost for AWS-centric environments. However, it might be less intuitive for beginners than some other services, which prioritize user-friendly interfaces and extensive marketing features.Pricing: Free plans for 3,000 message charges per month, and then $0.10 for every 1,000 emails you send.Pros:Pay-as-you-go rather than subscription-based pricing – you can send a near-unlimited emails Quickly integrate with your existing application or platformChoose from shared,Comments
Mailgun is an email sending service that provides logging and an API to send emails. PowerShell is particularly strong in its ability to use REST API’s. There are many use cases for needing to send emails, but one of the most common is that of sending emails when scripts are completed. This may be for status updates or failures.With that in mind, how do we set up MailGun for use with PowerShell and send emails as we need them? In this article, we will explore this use case and how best to create a simple script to send an email using MailGun.Setting Up MailgunOnce you have created a Mailgun account, there are a few simple steps. Below are the next two steps to configure.Adding your Domain to send email fromRetrieving API KeyAdd a DomainNavigate to Sending → Domains and click on Add New Domain. Create the domain as follows:Image # Expand Upon clicking Add Domain, you will be brought to a screen listing all of the corresponding DNS records that you will need to be entered in whichever DNS provider you have. Once all those settings have been added, and you have verified your DNS settings, we can retrieve the API key.Retrieving the API KeyUnlike many other API’s, Mailgun does not use Tokens, but a single API key for all services. Navigate to Account → Settings and choose API Keys. Click on API Security and view the Private API Key. This will be the key we use to authenticate and
2025-04-07Send emails via PowerShell.Creating PowerShell ScriptLike many other API’s we will use the familiar Invoke-RestMethod method to actually create the HTTP call to send the email via API. The authentication method to use is Basic Auth, with the API header key. Additionally, we will create an object to hold our data but pass this in via the Form parameter which is using multi-part/formdata. This is different than other API’s which typically uses JSON.What are the fields that are required and optional? Below we take a look at what is needed, and then what are some of the other available options. More settings are available in the Mailgun API documentation.RequiredFromToSubjectTextOptionalThough we don’t list all of the optional fields here, these are some of the more interesting and useful ones.CC & BCCHTMLattachment (must use multi-part/formdatainline (can be used to send inline images)o:testmode – If set to true, Mailgun will accept the message but it will not be sent. Keep in mind that you are still charged for the message (unless under the free limit).o:deliverytime – If configured, you can set a future delivery time for up to 3 days in advance for the future. Mailgun uses the rfc2822 date format.Finally, let’s create a simple script to send a basic, non-HTML message, using the MailGun API.$APIKey = 'key-asdf887as8fa8df8a7df87sd8f8sa8sd'$Params = @{ "URI" = ' "Form" = @{ "from" = '[email protected]' "to" = '[email protected]' "subject" = 'Test Email' "text" = 'Test Text!' } "Authentication" = 'Basic' "Credential" = (New-Object System.Management.Automation.PSCredential ("api", ($APIKey |
2025-03-27The Begin validation button and confirm the intention to perform the validation by clicking Begin. Keep in mind - these validations take some processing time! You'll see the display demonstrating the validations as being in progress. Once complete, just click the Download validations result button.API endpointsPOST - API command used to Submit Job URL: - API command used to Gather Job StatusURL: - API command used to Cancel JobURL: to keep in mindFor successful implementation with your particular use case, make sure to remember the following:Only one job can be processed per account at any given timeThe processing rate of lists can vary depending on list size and system loadFeatures & highlightsIn summary, here's the of options Bulk Validations provides for you:Perform a list-based validation much faster than can be done one-by-oneBoth CSV and JSON versions of processed email addresses availablePerpetually retrievable and parseableOnly three new simple sets of APIs that anyone already oriented with Mailgun's architecture can quickly and readily adoptExisting Mailing Lists uploaded to your Mailgun account are readily able to use - right awayNeed Support?Our Support Team here at Sinch Mailgun is happy to help! Reach out to us in the Support page of your Mailgun Control Panel, and we'll be with you shortly!
2025-04-23In large part to the app’s contact list management capabilities and mail customization features.#12) MailgunBest for small to large businesses.Price: Mailgun will allow you to send 10000 emails per month for free. It has three more pricing plans i.e. Production ($79 per month), Scale ($325 per month), and Enterprise (Get a quote).Mailgun provides solutions for Email marketing, Transactional emails, Email parsing, etc. It provides Email API to help developers integrate email into their apps. You will be able to build your service with an open-source library. It guarantees that the average API response time will be less than 500 ms.Features:Mailgun provides Email API services with features like advanced email analytics, better deliverability, and email parsing & routing features.It provides email validation features like custom grammar checks, validating emails based on billions of sent emails, protecting the list from typos, avoiding high-risk addresses, etc.It provides a powerful sending infrastructure with SMTP integration and a RESTful API.Verdict: Mailgun has good reviews for its email delivery and support services.Website: MailjetBest for small to large businesses.Price: Mailjet offers a free plan that will allow you to send 6000 emails per month. You can choose the number of emails to be sent per month with Basic and Premium plans and the prices will change accordingly.For 30000 emails, the Basic plan will cost you $8.69 per month and the Premium will cost $18.86 per month. You can get a quote for the enterprise plan.Mailjet provides transactional & email marketing solutions. It has features for creating, managing, sending, and optimizing emails. You will get actionable insights through a complete overview of your email performance and real-time monitoring. For better engagement, Mailjet will help you to personalize email templates.Features: Mailjet has an email template gallery and an intuitive drag-and-drop email builder.Its collaboration features will let you work together as a team in real time.It will allow you to lock specific sections of your templates.Subscription forms will help you to grow your email list.Verdict: Mailjet has good reviews for email marketing. The tool has features to help you organize the list and create targeted segments.Website: SendGridBest for small to large businesses.Price: SendGrid offers a free plan that will allow you to send 40000 emails for free for the first month and then 100 emails per day. Essentials 40K plan will cost you $14.95 per month (40000 emails) and the Pro plan will cost you $79.95 per month. You can get a quote for the Premier plan.SendGrid provides the platform for shipping notifications, password resets, email newsletters, and promotional emails. The platform will allow you to add the contacts through CSV upload, Signup forms, and the contacts API. It has functionalities for managing recipients, scheduling, content, and testing.Suggested reading => Best alternatives to SendGridFeatures: Email Marketing has features for automation, design, templates, and statistics.It provides email API with features of Web API, SMTP Service, Transactional email, and Email validation.It provides custom SPF and DKIM record creation to eliminate domain spoofing and phishing emails.Verdict: SendGrid is a cloud-based platform that provides
2025-04-13