Hi!
I am trying to integrate SendGrid email service with Glitch. Currently I am receiving emails sent from Glitch, but they are being saved under “Span” on gmail. ChatGPT suggested authenticating my domain.
¿What should I set for the host?
Thanks in advance.
1 Like
I’m not familiar with sendgrid, but authenticating emails typically requires adding a text DNS record to use DKIM or some other authenatication standard - because you don’t have access to the DNS settings for your glitch subdomain, you can’t add the necessary records. I’d recommend either buying a cheap domain or seeing if you can get a free subdomain with DNS control from e.g. https://freedns.afraid.org, which should allow you to send authenticated emails from that domain.
hopefully this makes some sense in the context of sendgrid
1 Like
@Pufferfish101007 Thank you for your quick anwser.
After sharing with chat-gpt your answer, chat-gpt is suggesting me, among other possible solutions, to send the email from Gmail servers, directly, in which case I won’t need to auhtenticate the DNS. It it possible to confgiure gmail SMPT or API on Glitch?
How to Resolve It:
Option 1: Use Gmail Directly to Send Emails
You can configure your application in Glitch to use Gmail’s SMTP servers or Gmail’s API to send emails. This ensures that emails are sent from Google’s servers, and you won’t need to authenticate anything additional.
Gmail SMTP Configuration:
- Server:
smtp.gmail.com
- Port: 587 (TLS) or 465 (SSL)
- Username: Your email address (
brfignoni@gmail.com
)
- Password: Your Gmail password or an app-specific password (if two-step verification is enabled).
Option 2: Use a Custom Domain
If you have your own domain (e.g., brunofignoni.com
), you can set it up with SendGrid and send emails from an address like you@brunofignoni.com
. This requires you to configure the domain’s DNS records to authenticate it with SendGrid.
Option 3: Use a Generic Sender from SendGrid
If you cannot use Gmail directly or a custom domain, SendGrid allows you to use their authenticated domain to send emails. However, this will display a less personalized sender.
1 Like
not sure about SMTP servers but I see no reason why the gmail api wouldn’t work - i’ve used other google apis on glitch before without any issues. Gmail API Overview | Google for Developers
@Pufferfish101007
update:
I have sucessfully integrated the Gmail API, using nodemailer, and googleapis packages. It is working great. To anyone reading this thread, this is the tutorial I have used:
2 Likes