Sending email using cURL with a password with special character in bash script

I have an SMTP configuration like the follows: (everything is dummy data)

SMTP_USERNAME="fakenews@yahoo.comg"
SMTP_SERVER="smtp.office365.com"
SMTP_PASSWORD='rdjsllskdslsds!'
SMTP_PORT="587"
EMAIL_FROM="support@fakernews.com"
EMAIL_TO="rfakeuser@fakernews.com"

Note the "!" mark at the end of the password. This cannot be changed.

When I run the below command with everything hardcoded, it works fine, and an email is sent.

curl --url smtp://smtp.office365.com:587 --mail-from support@fakernews.com --mail-rcpt rfakeuser@fakernews.com --upload-file tempemailbody_1.txt --user fakenews@yahoo.comg:rdjsllskdslsds! --ssl

However, when I replace them with variables, as below, I keep getting access denied.

curl --url "smtp://$SMTP_SERVER:$SMTP_PORT" --mail-from $EMAIL_FROM --mail-rcpt $EMAIL_TO --upload-file tempemailbody_1.txt  --user "$SMTP_USERNAME:$SMTP_PASSWORD" --ssl

The error message is :

curl: (9) remote access denied: 501

I think that this is because somehow the variable interpretation is causing the issue, but I cant figure out what is it. What should I change in the command to make it work ?