Upgrade to 5.1 - SendGrid not working

Your software
My Mautic version is: 5.1
My PHP version is: 8.2
My Database type and version is: Mysql 8.0

Your problem
My problem is:

Hello, I upgrade from 3.2.5 to 5.1 today. The upgrade went smoothly and is working. I am now trying to get SendGrid configured. Installed SendGrid with:

composer require symfony/sendgrid-mailer

There were no errors during the install.

These errors are showing in the log:

In mautic email settings, I set the Scheme to: sendgrid:api and the User to my API key but when I save, it has an error “The mailer DNS must contain a host (use “default” by default).”

And it says “Using currently DSN: n/a”

Steps I have tried to fix the problem:

I looked in the .env file and there’s nothing there for Send Grid:

I added the following line with no success:

MAILER_DSN=sendgrid+api://MY_API_KEY@default

I’ve tried clearing the cache with no success.

Thanks.

UPDATE: I finally resolved the issue. For how good Mautic is, I want to preface this with the fact that the Mautic + SendGrid integration documentation is extremely poor.

  1. You must install SendGrid via composer:

composer require symfony/sendgrid-mailer

  1. You must configure the Email DSN as follows:

Scheme: sendgrid+api
Host: api.sendgrid.com
Port: Leave Blank
Path: Leave Blank
User: Your SendGrip API key
Password: Leave Blank

I hope this helps prevent other people from wasting hours of their time.

3 Likes

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.