outgoing smtp password api key fails to save/work #5313

Open
opened 2026-02-20 16:59:30 -05:00 by deekerman · 2 comments
Owner

Originally created by @IAmBecomeDeth on GitHub (Mar 24, 2025).

Issue

This is a bug going back to 7.x version.

bug1:
you have mail_smtppass set to varchar100.
brevo (sendinblue) smtp password uses an api key. Many other services do as well.
I measured length and the password/api key I have been assigned which is 90 characters.
when saving, the password was truncated at 100 because of encryption.
I increased mail_smtppass to varchar300 using mysqladmin
the password saved 128chars

same bug/bug2:
however... it still does not work.

In addition to being really long, the password also contains two -s and there is an open bug report for special characters in passwords being saved wrong. this may be related. I can try changing to my web server email server but I don't plan to do large batches with that server so this is not a full fix

How do I manually encrypt the password and save it to this field for testing and to get by until this bug is fixed?

Possible Fix

Fix 1, increase mail_smtppass from varchar90 to varchar200.
Fix 2a bug with larger length data being decrypted and sent properly (maybe, but probably not)
fix 2b bug with escaping of special characters while saving or during use.

Steps to Reproduce the Issue

1.enter smtp details for brevo.
2.paste password but do not save.
3.test the connection. success!
4. save
5. test the connection. fail!

Context

anyone with an excessively long smtp password (api keys) can not send emails.
anyone with special characters in smtp password (also api keys) can not send emails.

unfortunately, as end users we have no control over api key password complexity or lengths.

Version

8.8

What browser are you currently using?

Safari

Browser Version

Safari 18.3.1

Environment Information

mysql php 8.3

Operating System and Version

ubuntu 20.04.06

Originally created by @IAmBecomeDeth on GitHub (Mar 24, 2025). ### Issue This is a bug going back to 7.x version. bug1: you have mail_smtppass set to varchar100. brevo (sendinblue) smtp password uses an api key. Many other services do as well. I measured length and the password/api key I have been assigned which is 90 characters. when saving, the password was truncated at 100 because of encryption. I increased mail_smtppass to varchar300 using mysqladmin the password saved 128chars same bug/bug2: however... it still does not work. In addition to being really long, the password also contains two -s and there is an open bug report for special characters in passwords being saved wrong. this may be related. I can try changing to my web server email server but I don't plan to do large batches with that server so this is not a full fix How do I manually encrypt the password and save it to this field for testing and to get by until this bug is fixed? ### Possible Fix Fix 1, increase mail_smtppass from varchar90 to varchar200. Fix 2a bug with larger length data being decrypted and sent properly (maybe, but probably not) fix 2b bug with escaping of special characters while saving or during use. ### Steps to Reproduce the Issue ```bash 1.enter smtp details for brevo. 2.paste password but do not save. 3.test the connection. success! 4. save 5. test the connection. fail! ``` ### Context anyone with an excessively long smtp password (api keys) can not send emails. anyone with special characters in smtp password (also api keys) can not send emails. unfortunately, as end users we have no control over api key password complexity or lengths. ### Version 8.8 ### What browser are you currently using? Safari ### Browser Version Safari 18.3.1 ### Environment Information mysql php 8.3 ### Operating System and Version ubuntu 20.04.06
Author
Owner

@johnM2401 commented on GitHub (Mar 25, 2025):

Hey!
Thank you for raising these issues.

Just to let you know, I've transferred this over to the SuiteCRM7 repo as the SMTP password issues are present in both SuiteCRM7 and SuiteCRM8 (and stem from SuiteCRM7-side functionality.)
So, any fixes done to these in the SuiteCRM7 codebase will be pulled into SuiteCRM8.

Also, tagging as a duplicate of:
https://github.com/salesagility/SuiteCRM/issues/10506

Thank you again!

@johnM2401 commented on GitHub (Mar 25, 2025): Hey! Thank you for raising these issues. Just to let you know, I've transferred this over to the SuiteCRM7 repo as the SMTP password issues are present in both SuiteCRM7 and SuiteCRM8 (and stem from SuiteCRM7-side functionality.) So, any fixes done to these in the SuiteCRM7 codebase will be pulled into SuiteCRM8. Also, tagging as a duplicate of: https://github.com/salesagility/SuiteCRM/issues/10506 Thank you again!
Author
Owner

@IAmBecomeDeth commented on GitHub (Mar 25, 2025):

I was looking through the codebase to try to find the problematic code, but the code goes back and forth through several include files for different functions and I didn't have enough time yesterday. I will try to look a little deeper to find where the problem is if I can find it.

@IAmBecomeDeth commented on GitHub (Mar 25, 2025): I was looking through the codebase to try to find the problematic code, but the code goes back and forth through several include files for different functions and I didn't have enough time yesterday. I will try to look a little deeper to find where the problem is if I can find it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SuiteCRM-SuiteCRM#5313
No description provided.