Sendgrid API Key Mail Server Settings
Anyone else using Sendgrid with Coldfusion 2023? We are using the Sendgrid SMTP API, https://www.twilio.com/docs/sendgrid/for-developers/sending-email/integrating-with-the-smtp-api, and the issue is with the password. They have you create an API key for the password, and the key is 70 characters long in the format SG.xxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx. When entering this as the password in the Coldfusion administrator mail server settings, and doing a test with cfmail, mail.log shows the error "Can not decode string "SG". The input string is not base64-encoded." All we can think is Coldfusion is treating it as a JWT since it has two dots in the string. When entering anything else, we get the normal authentication error in mail.log. Also tried the cfadmin API to set the mail settings and have the same issue. Can you think of a way we could change the way we enter the password in the mail settings? We could always use the Sendgrid Web API instead of SMTP, but would really hate to update all of our cfmail tags. Any ideas would be appreciated!
