How to configure SendGrid in cPanel

How to configure SendGrid in cPanel

How to configure SendGrid in cPanel. SendGrid is a cloud-based email service that provides a reliable transactional e-mail delivery, scalability and real-time analysis system along with flexible APIs that facilitate personalized integration.

To configure SendGrid and use it to send mails from a server with cPanel, you should follow these steps …

How to configure SendGrid in cPanel

  • Login to WHM with root privileges (administrator)
  • Enter Service Configuration> Exim Configuration Manger
  • Within this section you can access Advanced Editor
  • Search Section: AUTH and place the following …



Driver = plaintext

Public_name = LOGIN

Client_send =: <YourSendGridUsername>: <YourSendGridPassword>

how to send mail in php using sendgrid

Obviously you should replace the login with valid data. It is important to note that this login will send all the mails that you configure on this server, it is advisable to use one for each computer so that it is not difficult to locate sent emails later.


  • Then find Section: PREROUTERS and places this …


Driver = manualroute

Domains =! + Local_domains

Senders = * @ <YourDomainHere>

Transport = sendgrid_smtp

Route_list = “* byname”

Host_find_failed = defer

How sendgrid works How to configure SendGrid in cPanel

In the “senders” line you must define the e-mail you want to send to SendGrid separated by colons (eg * * ), you can also redirect all mail deleting this line, or send all but some using the exclamation mark (eg !* !* )


  • Then in Section: TRANSPORTSTART…


Driver = smtp

Hosts =

Hosts_require_auth =

Hosts_require_tls =

Save the changes and test the service, you should see the emails you send appear in the SendGrid panel.