Anyone able to help me troubleshoot using sendgrid...
# permit-saas
a
Anyone able to help me troubleshoot using sendgrid for SMTP gateway? I've entered all of the creds multiple time but test email always fails. Curious to know if there is any feedback on why.
a
Hi @Abe Clark, I'm an AI assistant for Permit.io. I'll analyze available sources and get back to you shortly.
p
Hey, thanks for reaching out ! It seems our team is a little busy right now, a human will be with you within the next hour or so. In the meantime, can I help you ?
a
Currently, Permit Elements supports SMTP Provider for email configuration (1) . SendGrid, along with Mailgun, Amazon SES, Mandrill, and SparkPost are listed as "Coming soon" . Since SendGrid isn't directly supported yet, you'll need to use SendGrid's SMTP relay service. For SendGrid SMTP, typically you'd use: • SMTP Host: smtp.sendgrid.net • Port: 587 (or 465 for SSL) • Username: apikey (literal string "apikey") • Password: Your SendGrid API key To troubleshoot the test email failure, I recommend checking the browser's Developer Tools Network tab for more detailed error information (2) . This can reveal specific error messages about why the test is failing . You can also reach out over Email for additional support with this config
To learn more, see the sources I considered: [[1] Email Configuration and Templates](https://docs.permit.io/embeddable-uis/email-configuration-and-templates) [[2] Troubleshooting](https://docs.permit.io/embeddable-uis/troubleshooting)
o
Hi @Abe Clark sure we can take a look, can you share your configuration details (without secrets), and the relevant workspace/project/env ?
Also worth checking the logs on the SendGrid side
a
I'm able to send emails with these creds using curl on my end. So feels like it must be on permit side?
Copy code
curl --url '<smtp://smtp.sendgrid.net:587>' \
  --ssl-reqd \
  --user 'apikey:MYKEY' \
  --mail-from '<mailto:notifications@usewonderful.com|notifications@usewonderful.com>' \
  --mail-rcpt '<mailto:MYEMAIL@gmail.com|MYEMAIL@gmail.com>' \
  --upload-file <(echo -e "From: <mailto:notifications@usewonderful.com|notifications@usewonderful.com>
To: <mailto:MYEMAIL@gmail.com|MYEMAIL@gmail.com>
Subject: Test email via curl and SendGrid SMTP

This is a test email sent via curl using SendGrid SMTP.")
Screenshot 2025-08-17 at 5.36.17 PM.png
Copy code
{
  "id": "99ccfbbfac6046aeb3f1fb86dbc45878",
  "title": "The SMTP configuration is invalid or malformed - the email wasn't sent",
  "error_code": "INVALID_SMTP_CONFIGURATION",
  "message": "We are sorry for the inconvenience, Could not send email using the SMTP server. Please check the SMTP server is configured correctly and that the template content is valid.\nIf the issue keeps happening, contact our support on Slack for further guidance."
}
o
Workspace, Project and environment?
a
Copy code
# Environment: 8671f6b2ae42487fa851e9f6c43a8cbd
# Project: 963052528a05464f81806c264751d0ea
# Organization: dfc4d67c54f64ea79eb0ff0864c07cc
I think organization === workspace?
o
Yes, thank you
a
Any luck finding anything on the permit side?
o
Checked with the team, there’s a lead regarding a MIME type error; they are doing more checks now, and will revert to you shortly. CC: @Eli Moshkovich
a
Thanks!
e
Hey @Abe Clark Thanks for the details. Two quick checks + one test that will help us zero-in on this: 1. Please confirm Sender Authentication is set up in SendGrid (either Domain Authentication for your domain or Single Sender Verification) at https://app.sendgrid.com. ◦ If the From address isn’t from an authenticated domain (or verified single sender), SendGrid will reject the SMTP send even if creds are correct. 2. Could you run this SMTP test from your machine and paste the full server transcript output?
Copy code
swaks --server <http://smtp.sendgrid.net:587|smtp.sendgrid.net:587> \
  --tls \
  --auth LOGIN \
  --auth-user apikey \
  --auth-password 'REPLACE_WITH_YOUR_SENDGRID_API_KEY' \
  --from <mailto:notifications@usewonderful.com|notifications@usewonderful.com> \
  --to <mailto:YOUR_EMAIL@example.com|YOUR_EMAIL@example.com> \
  --header "Subject: SendGrid SMTP test via swaks" \
  --body "This is a swaks SMTP test."
a
Thanks -- swaks output: I can confirm receipt of the email
Copy code
=== Trying <http://smtp.sendgrid.net:587|smtp.sendgrid.net:587>...
=== Connected to <http://smtp.sendgrid.net|smtp.sendgrid.net>.
<-  220 SG ESMTP service ready at geopod-ismtpd-1
 -> EHLO abes-macbook-pro.local
<-  <http://250-smtp.sendgrid.net|250-smtp.sendgrid.net>
<-  250-8BITMIME
<-  250-PIPELINING
<-  250-SIZE 31457280
<-  250-SMTPUTF8
<-  250-STARTTLS
<-  250-AUTH PLAIN LOGIN
<-  250 AUTH=PLAIN LOGIN
 -> STARTTLS
<-  220 Begin TLS negotiation now
=== TLS started with cipher TLSv1.3:AEAD-AES256-GCM-SHA384:256
=== TLS client certificate not requested and not sent
=== TLS no client certificate set
=== TLS peer[0]   subject=[/CN=*.<http://smtp.sendgrid.net|smtp.sendgrid.net>]
===               commonName=[*.<http://smtp.sendgrid.net|smtp.sendgrid.net>], subjectAltName=[DNS:*.<http://smtp.sendgrid.net|smtp.sendgrid.net>, DNS:<http://smtp.sendgrid.net|smtp.sendgrid.net>] notAfter=[2025-12-09T09:17:08Z]
=== TLS peer[1]   subject=[/C=US/ST=Arizona/L=Scottsdale/O=<http://GoDaddy.com|GoDaddy.com>, Inc./OU=<http://certs.godaddy.com/repository//CN=Go> Daddy Secure Certificate Authority - G2]
===               commonName=[Go Daddy Secure Certificate Authority - G2], subjectAltName=[] notAfter=[2031-05-03T07:00:00Z]
=== TLS peer[2]   subject=[/C=US/ST=Arizona/L=Scottsdale/O=<http://GoDaddy.com|GoDaddy.com>, Inc./CN=Go Daddy Root Certificate Authority - G2]
===               commonName=[Go Daddy Root Certificate Authority - G2], subjectAltName=[] notAfter=[2031-05-30T07:00:00Z]
=== TLS peer[3]   subject=[/C=US/O=The Go Daddy Group, Inc./OU=Go Daddy Class 2 Certification Authority]
===               commonName=[], subjectAltName=[] notAfter=[2034-06-29T17:06:20Z]
=== TLS peer certificate passed CA verification, passed host verification (using host <http://smtp.sendgrid.net|smtp.sendgrid.net> to verify)
 ~> EHLO abes-macbook-pro.local
<~  <http://250-smtp.sendgrid.net|250-smtp.sendgrid.net>
<~  250-8BITMIME
<~  250-PIPELINING
<~  250-SIZE 31457280
<~  250-SMTPUTF8
<~  250-STARTTLS
<~  250-AUTH PLAIN LOGIN
<~  250 AUTH=PLAIN LOGIN
 ~> AUTH LOGIN
<~  334 VXNlcm5hbWU6
 ~> YXBpa2V5
<~  334 UGFzc3dvcmQ6
 ~> U0cuMW53dnZhenVSM0t6aDJ5dy1KMGFEdy55THVkdWRPbmJxOVFTRG1LRWlMUUw1M05IN0p2ZVBwcDVsNHM5dmFFU0NB
<~  235 Authentication successful
 ~> MAIL FROM:<notifications@usewonderful.com>
<~  250 Sender address accepted
 ~> RCPT TO:<abeaclark@gmail.com>
<~  250 Recipient address accepted
 ~> DATA
<~  354 Continue
 ~> Date: Mon, 18 Aug 2025 09:50:12 -1000
 ~> To: <mailto:abeaclark@gmail.com|abeaclark@gmail.com>
 ~> From: <mailto:notifications@usewonderful.com|notifications@usewonderful.com>
 ~> Subject: SendGrid SMTP test via swaks
 ~> Message-Id: <20250818095012.015647@abes-macbook-pro.local>
 ~> X-Mailer: swaks v20240103.0 <http://jetmore.org/john/code/swaks/|jetmore.org/john/code/swaks/>
 ~> 
 ~> This is a swaks SMTP test.
 ~> 
 ~> 
 ~> .
<~  250 Ok: queued as -ilcxyGoR6m9X2SEUI2wrA
 ~> QUIT
<~  221 See you later
=== Connection closed with remote host.
Screenshot 2025-08-18 at 9.52.37 AM.png
I have been sending emails from this domain successfully using the sendgrid api and have been able to send via smtp
e
Thanks @Abe Clark, your
swaks
test confirms your SendGrid setup is correct and delivering. We’ve tracked this down to an issue on our side that affects the way test emails are handled. We’ve opened an internal ticket to get it resolved. Ticket reference:
PER-12781
No further action is required on your end, your SMTP configuration looks good. We’ll update you here as soon as the fix is live.
a
Great thank you!
e
@Abe Clark - quick follow-up: after double-checking on our end, I can confirm that Permit’s Generic SMTP provider flow is working correctly. Since SendGrid isn’t officially supported yet, could you try configuring it as a regular SMTP provider instead? As a simple test, you can also try with https://ethereal.email — it’s a free test SMTP service I've used internally (screenshot attached). That will confirm the setup test. Let us know if you’re able to get it working this way - that’ll help us move forward until we roll out full SendGrid support.
a
That is how I have it setup now -- I just input the sendgrid details into the SMTP provider setup.
I'm unable to select any other options even if I wanted to
I'm willing to share my api key in DM if helpful. I can just rotate it after
e
@Abe Clark Right, at the moment Permit supports only the Generic SMTP provider. The SendGrid option you see in the UI isn’t active yet, and that’s why using it directly won’t work. When you configure SendGrid through the generic SMTP option (as you’ve done), it still requires a different handling flow on our side, which isn’t supported yet. That’s what’s causing the failure. Could you try testing with the SMTP sandbox I shared earlier - https://ethereal.email , and confirm it works for you? That will help verify that the generic SMTP flow is functioning properly on your end too.
a
ah gotcha. kk -- can do. The test setup of course won't help us go live, but happy to QA that to ensure that flow works
I did get the success message on the test email when using the ethereal.email creds. It tried to send to my account email address which of course didn't send, so I can't verify receipt, but I can say I saw the green toast for success on your platform
Any ideas when sendgrid will work? Do you know if it will work with gmail smtp? I could use that in the meantime as a stopgap
e
Hi @Abe Clark - I just tried it myself using Gmail’s SMTP with an App Password, and it worked successfully on my end. Also, just a heads-up: I’ve already implemented a fix for the SendGrid case. It will go out with our next release, I expect that to be soon. In the meantime, Gmail SMTP should let you bridge things until the update is live 🙂
a
Amazing thank you. I'll look forward to the sendgrid availability 👍
e
Hi @Abe Clark, My fix is live right now. Can you please recheck the SendGrid setup and let me know if it works for you?
a
It works! Thank you for setting this up! Huge help.
🎉 1