KEYCLOAK Test Connection doesn't work "Error! Failed to send email" - ssl

I am trying to use the Forgot Password function for my Keycloak authentication. So I have already set On for the Forgot Password in the Login section. And I have tried to set up the configurations under Realm Email.
In the email tab I entered
host smtp.gmail.com
smtp port 465
username ***#gmail.com
SSL enabled
Authentication - enabled with username and password
But when i'm testing the connection, I keep getting the error "Error! Failed to send email".
Any Help would be highly appreciated, Thank you.

You need to provide your email address to Keycloak administrator's email address, and turn on "Allow less secure apps" on Google account settings page.
https://support.google.com/accounts/answer/6010255?hl=en
If succeed, you can see SMTP test message from Keycloak in your mail box.

Here you have used the wrong port with enabling SSL
If SSL is enabled ---> port should be 456
If StartTLS is enabled ---> port should be 587

Related

Issue while trying to configure outgoing mail server

I tried setting up the outgoing server with the following credentials:
SMTP Server : smtp.office365.com, SMTP Port : 25, Connection Security :TLS (STARTTLS), Username : ***, Password : ***
The Test connection is successful, but my outgoing mail is failed with the following message:
Mail delivery failed via SMTP server 'smtp.office365.com'.
SMTPDataError: 554
5.2.252 SendAsDenied
Any clue will be helpful..
Try to set right configurations for outgoing SMTP server based on Google guides.
The outgoing SMTP server, smtp.gmail.com, supports TLS. If your client
begins with plain text, before issuing the STARTTLS command, use port
465 (for SSL), or port 587 (for TLS).

Setting Outgoing Emails Servers in Odoo

I'm trying to set-up outgoing email server in Odoo for my Organization.
For doing so the system request for username and password along with server details,
Now we have around 15 users in Odoo.
Do we need to enter all usernames individually?
Odoo is not a mail server.
You have to configure with your any of your official mail accounts (gmail/outlook/any other official mail service you have for your office). odoo will use those to send mail.
Description: A description for the outgoing mail server.
SMTP server: The pointer to the SMTP of your server, ex. smtp.gmail.com .
SMTP port: The port of your SMTP server, ex. 465 for Gmail.
Connection security: You should choose SSL/TLS for Gmail.
Username: Your e-mail account, like: youremail#gmail.com
Password: Password of your e-mail account.
SMTP Server :- smtp.gmail.com
SMTP Port :- 465
Connection Security :- SSL/TLS
Username :- Your mail account
Password:- Password of your email account
The following fields are needed to configure the mail server.
Description :-> A description of the Outgoing mail server
Priority :-> Priority of your outgoing mail server. Low priority mail servers are used first and mostly.
SMTP Server :-> The server SMTP e.g, zsmtp.hybridzimbra.com(for Thunderbird)
SMTP Port :-> The SMTP port of your server e.g, 465 (for Thunderbird)
Connection Security :-> Security to be used like TLS(STARTTLS) or SSL/TLS. Use SSL/TLS for Thunderbird
Username :-> Your e-mail account.
Password:-> The password of your e-mail account.
I think the following document should help you out.
https://www.odoo.com/documentation/15.0/applications/general/email_communication/email_servers.html

Is connection to SMTP server secure?

I would like to be sure on a point about connection to an SMTP server.
If I am using SSL to connect to an SMTP server, are my password and username encrypted to connect to the SMTP server ?
Thank you for your help
Cheers
They should be. Either your server should require the entire SMTP session to be SSL, or, after the initial connection, your SMTP session will switch to SSL.
I've never known a SMTP server that required SSL, that didn't encrypt the creds.

Successfully mailing joomla contact form stopped mailing, now giving SMTP error

using joomla 1.7.2 & google app mailing which is working fine in the web client.
the contact form was sending mails successfully until 23 july, now it stopped mailng & giving the error
"SMTP Error! Could not authenticate".
when using TLS its gives error:
"SMTP Error! Could not authenticate.
Language string failed to load:
tls Language string failed to load: smtp_errorSTARTTLS command used
when not advertised"
Here is the joomla Mail Setting in the global configuration that was working earlier:
Mailer SMTP
From email email#mydomain.com
From Name email#mydomain.com
Sendmail Path /usr/sbin/sendmail
SMTP Authentication Yes
SMTP Security TLS
SMTP Port 587
SMTP Username email#mydomain.com
SMTP Password ******
SMTP Host smtp.gmail.com
everything is same as it was when the mailing was working.
Now tried changing
smtp ports to: 465 & 587, with both SSL & TLS;
smtp host to: ssl://smtp.gmail.com:465, SMTP Security: None, SMTP Port: 25
Same mailing problem occurred few months back also but then just by using SMTP TLS/587 & full email id in the 'From Name' started the mailing.
BUT NOW NO SETTING SEEMS TO BE WORKING.
i also checked this post
How to configure Joomla 1.7 SMTP email with a google apps email address
and found openssl is enabled in my php_info.
Did google changed anything or my hosting server? What should i look for if my hosing server changed anything?
i could not find any other setting to try!
Anyone plz provide some clue!
i got the solution to the issue & mailing started again.
What's needed is to update the TXT DNS record to include the SPF entry for Google Mail.
so i updated my TXT DNS record to:
"v=spf1 +a +mx +ip4:<my_domain_ip> +include:_spf.google.com ?all"
So to be able to send emails using Google App Mailing from our domain we must have a TXT DNS record with atleast
"v=spf1 +include:_spf.google.com ~all"`

How to authenticate to the server over a secure connection to send mail from a script?

My current script uses this simple command:
mail -s "$my_msg" username\#mycompany.com </dev/null
When changing it to use a mailing list rather than the hardcoded username:
mail -s "$my_msg" mailing_list_1\#groups.mycompany.com </dev/null
It produces:
550 Unrouteable address
I need to be able to authenticate to the server over a secure connection.
How do I do this?
Linux version 2.6.26
msmtp is an SMTP client:
TLS/SSL both in SMTP-over-SSL mode and
in STARTTLS mode. Full certificate
trust checks can be performed. A
client certificate can be sent.