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

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"`

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

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

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

Invalid SSL Certificate for Mail Server

Though this question is in the context of a particular software (Discourse forum software), it is really about SSL certificates of mail servers.
Here is my setup:
Main Website: mydomain.com (Hosted on Hostgator)
Forum Website (Discourse forum software): forum.mydomain.com (Hosted on DigitalOcean)
Mail Server (used by Discourse to send email to members): mail.mydomain.com (Hosted on Hostgator)
Discourse settings for SMTP:
DISCOURSE_SMTP_ADDRESS: mail.mydomain.com
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: forum-no-reply#mydomain.com
DISCOURSE_SMTP_PASSWORD: "mypassword"
DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)
I have SSL certificates set up for mydomain.com and mail.mydomain.com on Hostgator (A single SSL certificate for mydomain.com as well as several subdomains (like mail.mydomain.com, webmail.mydomain.com, etc)).
When I try to send a test email from the Discourse admin interface using the above settings, it gives me an 'invalid certificate' error.
So, I tried to debug through openssl s_client with the following command:
openssl s_client -servername mail.mydomain.com -starttls smtp -crlf -connect mail.mydomain.com:587
It sends the SSL certificate of mydomain.com with CN as follows
subject=CN = mydomain.com
and establishes a SSL Session with TLS v1.2
Here are the weird results of EHLO after that:
EHLO mail.mydomain.com
250-xx-xx-xx.webhostbox.net Hello forum.mydomain.com [xx.xx.xx.xx]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250-AUTH PLAIN LOGIN
250 HELP
As you can see with the second line in the above code, it responds from xx-xx-xx.webhostbox.net instead of mail.mydomain.com or mydomain.com
I think this is why I'm getting a 'invalid certificate' error.
If I change the Discourse SMTP settings as below (just changing the first line)
DISCOURSE_SMTP_ADDRESS: xx-xx-xx.webhostbox.net
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: forum-no-reply#mydomain.com
DISCOURSE_SMTP_PASSWORD: "mypassword"
DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)
then everything works fine and all emails gets sent.
Could someone please let me know if this working solution is secure? I think it's not secure since I am using xx-xx-xx.webhostbox.net as SMTP address (which could expose the emails to risks) instead of mail.mydomain.com. If this is not secure, how should I proceed to get a secure solution to this problem?
As documented by Hostgator it is actually the correct setup to use the name of the hostgator server full.servername.com and NOT the name of your own domain example.com as the mail server. This is because the mail server is not specific to your domain but is a common mail server for multiple domains.
Note that this is very similar to Can't seem to connect to FTPS via Atom editor Remote FTP but only for SMTP not FTP. My explanation there can be applied to SMTP too.

How do I use SMTP on a test development server?

I am building an ecommerce website on a local Windows 7 pro (Apache/php) test server with a self-signed SSL. I have the mydomain.com in the hosts file redirecting to localhost - so far so good.
When I try to use the email function of the ecommerce software via Gmail smtp, I am getting an SSL error:
[23-Apr-2018 03:00:06 America/New_York] Connection failed. Error #2: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed [C:\Apache24\htdocs\includes\classes\vendors\PHPMailer\class.smtp.php line 379]
[23-Apr-2018 03:00:06 America/New_York] SMTP Error: Could not connect to SMTP host.
[23-Apr-2018 03:00:06 America/New_York] CLIENT -> SERVER: QUIT
I thought about just getting a cheap CA SSL and installing it on the server but I'm not sure this will work, since the Gmail smtp server is obviously not using my hosts file. This is just a guess at this point.
Question I'd like answered is, 1, will installing CA cert resolve the issue, and 2. if not, what is your strategy to have a functional email on a test server with domain in hosts file?
Thank you,
David
I added the following to the function responsible for smtp connection. Warning, only to be used on completely secure environment, your own test server, never on a live server.
$options["ssl"]=array("verify_peer"=>false,"verify_peer_name"=>false,"allow_self_signed"=>true);