CPANEL/WHM: How to configure a domain to use Sendgrid SMTP

You are obviously here because you want learn how to configure your Cpanel/WHM managed domain to use SendGrid’s SMTP mail servers. Just follow these easy steps and you will be on your way in no time.

  1. Login to your WHM account
  2. Click on Service Configuration -> Exim Configuration Manger
  3. Click on the Advanced Editor tab

  4. Find the section called Section: AUTH and paste the following into the text box, substituting in your SendGrid username and password:
    sendgrid_login:
    driver = plaintext
    public_name = LOGIN
    client_send = : <YourSendGridUsername> : <YourSendGridPassword>

  5. Find the section called Section: PREROUTERS paste the following in the textbox, substituting in your Domain name in the senders line:
    send_via_sendgrid:
    driver = manualroute
    domains = ! +local_domains
    senders = *@<YourDomainHere>
    transport = sendgrid_smtp
    route_list = "* smtp.sendgrid.net::587 byname"
    host_find_failed = defer

  6. Find the section called Section: TRANSPORTSTART and paste the following in the textbox:
    sendgrid_smtp:
    driver = smtp
    hosts = smtp.sendgrid.net
    hosts_require_auth = smtp.sendgrid.net
    hosts_require_tls = smtp.sendgrid.net
    cpanel

Voila! That’s all there is to it!

See also  How to Improve Your Email Domain Reputation For Beginners
Photo of author
As Editor in Chief of HeatWare.net, Sood draws on over 20 years in Software Engineering to offer helpful tutorials and tips for MySQL, PostgreSQL, PHP, and everyday OS issues. Backed by hands-on work and real code examples, Sood breaks down Windows, macOS, and Linux so both beginners and power-users can learn valuable insights.

2 thoughts on “CPANEL/WHM: How to configure a domain to use Sendgrid SMTP”

  1. Hey, about your tutorial, if i have about 10domains on my WHM and i want the just 3 or 4 this domains is allow to send email using the sendgrid SMTP, how i implement

    the ( senders = *@ ) to use this 4domains only?

    How i do this, put the 4domains there and works fine?

    Another question, i put inside the or remove the and put : *@YourDomainHere

    ?
    Thanks!

Leave a Comment