Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Sendgrid API Key Mail Server Settings

New Here ,
May 31, 2025 May 31, 2025

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!

470
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 31, 2025 May 31, 2025

Well, this was a known issue prior to it being fixed in cf2023 (and 2021) in the Oct 2023 cf update. That's update 5 for cf2023. What update are you on?

 

Here's the indication of it being fixed back then:

https://helpx.adobe.com/coldfusion/kb/coldfusion-2023-update-5.html#bug-fix


/Charlie (troubleshooter, carehart. org)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 31, 2025 May 31, 2025

Thank you for the reply Charlie and apologies, I mistakenly typed 2023, but it is actually Coldfusion 2025.. I did see that fix for 2023, so I was suprised when we saw an issue on 2025.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 31, 2025 May 31, 2025

That's certainly interesting to hear. Either something changed again about the format of the key/password, or somehow Adobe forgot to include this fix in 2025 (which seems unlikely).

 

Either way, you may or may not get any reply from them here. Your best bet is to report it to them either via cfsup@adobe.com or by opening a ticket at tracker.adobe.com. The latter will benefit more people, as it would be viewable by all.

 

In fact, someone had reported it back in 2023, before it was fixed for those versions. Indeed, before writing my first reply here I'd seen that someone had commented there that it was happening for them on 2025.  You'll see I'd suggested to them also to open a new ticket, since that one was marked fixed back in 2023.

 

If you do file a new ticket, please do share the link here and there, so that interested folks can add a vote or comment and follow along in any news there from Adobe. 


/Charlie (troubleshooter, carehart. org)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 09, 2025 Jun 09, 2025

Here is the ticket:

https://tracker.adobe.com/#/view/CF-4226870

 

Thanks for being such an asset to the Coldufsion community for so many years @Charlie Arehart 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 09, 2025 Jun 09, 2025
LATEST

Thanks very much for the kind regards. And I just added a comment there (on that ticket), but let me repeat it here for the sake of others interested in this topic:

 

I can confirm getting the same error: a cfmail configured to send via sendgrid using a given apikey works in CF2023 (after its update 5, when this issue was fixed in Oct 2023) but it fails in CF2025 (even on its update 2, from May 2025).
I also tried to find any sort of low-level configuration change that might differ between CF2025 and 2023 (as may have been implemented with that Oct 2023 change to CF2023 and 2021), that might "allow" the mail process to do that needed wddx decoding/encoding referred to in the error. But I found nothing obvious. I'm guessing we'll have no choice but for Adobe to offer an update like the did in that other ticket from 2023 which Chad pointed to.

/Charlie (troubleshooter, carehart. org)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources