Rekblog.com

Recent Posts


Tags


Rekblog.com

How to use Sendgrid with PowerMTA like a Pro

Learn How to use Sendgrid API with PowerMTA in 5 minutes by adding a small trick

Reda El KasraouiReda El Kasraoui

It’s been a long time that i didn’t write an article due to a lot of challenges in my career, and then i decided to add new resolution 2019 to my list and is to write continuously here and share my experience in email marketing with my peeps.

First of all, Let me introduce myself to the new readers of REKBLOG.COM, My name is Reda El Kasraoui and I’m the only guy here is in this humble emailing blog.

Today, I Will show you how to integrate Sendgrid SMTP with PowerMTA the easy way, while i am explaining this for you guys make sure you have an activated account with Sendgrid

Let me make things faster and easy for you guys:

First of all, you will need to activate your API KEY in your Sendgrid account

Preparing Sendgrid API to Implement it with PowerMTA:

Creating an API key

  1. Go to the API Keys page in the SendGrid UI, and click Create API Key.
  2. Give your API key a name.
  3. Select Full Access, Restricted Access, or Billing Access.
  4. If you’re selecting Restricted Access, or Billing Access, select the specific permissions to give each category. For more information, see API key permissions.
  5. Click Create and View.
  6. Copy your API Key somewhere safe. For security reasons, do not put it directly in your code, or commit it somewhere like GitHub.
NOTE: Be Careful, you need to save the API key somewhere safe 
as you will not be able to retrieve or restore it.

Setup New PowerMTA Directives With Sendgrid:

Let’s say for example:

your Sendgrid Username is: “rekblog”, and your API Key is “YOUR_API_KEY_HERE”, Let’s say your VirtualMTA in your PowerMTA Config file is something goes like this:

<virtual-mta YOUR_VMTA_NAME>

 smtp-source-ip 1.2.3.4

 host-name rekblog.com

</virtual-mta>

We will add a new tag called <domain> that ends with </domain> which is similar to HTML, and it should look like the following:

<virtual-mta -YOUR_VMTA_NAME>

<domain *>

auth-username rekblog

auth-password YOUR_API_KEY_HERE

route smtp.sendgrid.net:25

use-starttls yes

max-smtp-out 1000

</domain>

 smtp-source-ip 1.2.3.4

 host-name rekblog.com

</virtual-mta>

Therefore we used Sendgrid With Powermta Directives starting with “SMTP Host” which is “smtp.sendgrid.net” and Port 25 (587, & 2525 are also allowed for unencrypted and TLS connections), Your Sendgrid Username is actually the SMTP Username and the API_Key is actually is the password

Also, we started the <domain> Tag with a star (*) to apply this configuration to all email domains, but if you want to apply only on gmail.com, aol.com, yahoo.com …etc, All you have to do is to change the star (*) with the domain macro you desire.

Most noteworthy , Here’s another answer for a question many of you will ask : “is it possible that my IP address in the same Virtual MTA get burned or blacklisted?” the answer is: “Definitely No! The IP address is like a user that access that SMTP for you

Let me know if you have any questions guys.

If you like what you see don’t forget to share this with your friends.

Happy new year everyone.

3tiw Cha7t 😉

<em>Email Developer, SEO Specialist and Full Stack Web Developer</em> <em>Tetouan, Tetouan/Tangier, 93000, Morocco</em>

Comments 1

Do You Want To Know The Latest Methods and Increase more than 500% of Mailing Earnings?

Subscribe Now!
Be the First to Know

Your Information will never be shared with any third party

Close this popup

There's Many Methods that don't deserve to be written as an article on Rekblog.com because it's working on a short term (From a Day to a Week Method), so we suggest to let you know by E-Mail.

What Kind of Methods You Will Get?

  • ISPs Inboxing Methods
  • Header Lines (INBOX!)
  • Great Dedicated Servers to Work With
  • IP Reputations Exact Methods
  • Free Tools to Work With
  • Free Support!

Do You Want To Know The Latest Methods and Increase more than 500% of Mailing Earnings?

Subscribe Now!
Be the First to Know

Your Information will never be shared with any third party

Close this popup

There's Many Methods that don't deserve to be written as an article on Rekblog.com because it's working on a short term (From a Day to a Week Method), so we suggest to let you know by E-Mail.

What Kind of Methods You Will Get?

  • ISPs Inboxing Methods
  • Header Lines (INBOX!)
  • Great Dedicated Servers to Work With
  • IP Reputations Exact Methods
  • Free Tools to Work With
  • Free Support!