I could successfully send e-mail notification in Hudson using gmail as the smtp server.
But when I try to configure our own smtp server, it gives the following error when trying to send the test mail:
Failed to send out e-mail
javax.mail.MessagingException: Exception reading response;
nested exception is:
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
Are there any special configurations with the e-mail notifications???
Edit:
Also does it require enforcing the security certificate and if so is there a way to achieve it???
Thanks
Please try using the following settings:
SMTP SERVER : smtp.gmail.com
use SMTP Authentication : true
use SSL : true
SMTP port : 465
I had this problem too. My solution was to make all the necessary configuration (check ssl box and stuff) and CLICK THE SAVE BUTTON before use the test mail.
i just had this issue before clicking the save button.
Changing the SMTP port from 587 to 465 also resolved this issue for me, even though I'm using an alternative SMTP service:
SMTP server: smtp.mandrill.com
Use SMTP Authentication: true
Use SSL: true
SMTP Port: 465
From what I can tell (disclaimer: I am by no means a Hudson/Jenkins expert)
the Hudson/Jenkins email plugin supports SSL encrypted SMTP communication - however this implementation requires that communications are encrypted from the get go.
When connecting on port 587, the server on the other end may expect a STARTTLS command (see this SSL vs TLS vs STARTTLS article). This command is sent using plain-text to 'upgrade' the connection to use SSL/TLS.
Hudson/Jenkins instead attempts to start negotiating SSL on port 587, which is promptly rejected, resulting in the following error:
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
I also tried adding additional JAVA options "-Dmail.smtp.starttls.enable=true" (configured in /etc/default/jenkins on Unbuntu) to enable TLS:
JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Dmail.smtp.starttls.enable=true"
Unfortunately this didn't resolve the issue for me.
After changing the port to 465, the SSL negotiation occurred correctly and the communication succeeded.
Hope that helps.
Related
I am building a Jenkins server on my AWS EC2 instance. After building finish, I want to send email to stakeholder.
I am using STMP with smtp.sendgrid.net in port 587.
But I sometime can not send email. The log from jenkins says
MessagingException message: Could not connect to SMTP host:
smtp.sendgrid.net, port: 587
I access to EC2 instance and telnet to sendgrid. It says:
[hostname#domain ~]$ telnet smtp.sendgrid.net 587
Trying 161.202.148.179...
telnet: connect to address 161.202.148.179: Connection timed out
Trying 161.202.148.182...
telnet: connect to address 161.202.148.182: Connection timed out
Trying 169.38.103.39...
Connected to smtp.sendgrid.net.
Escape character is '^]'.
220 SG ESMTP service ready at ismtpd0004p1maa1.sendgrid.net
I understand that mean I can only access to some ip coming from smtp.sendgrid domain. I am sure to open all outbound rules for EC2. Because the problem happens sometimes, so anyone could give me any suggestion for this situaions.I intend to use IP instead of domain, but it just a workaround, IP can change anytime.
Please help me.
I had a similar issue, if your EC2 outbound rules are opened then you should ensure that you provide SMTP authentication along with your SMTP server and SMTP port and your DNS resolvers are good enough.
Sendgrid expects username and password.
username: it's "apikey", It might have to be encoded in base64 "YXBpa2V5".
password: it's your API Key, get it from Sendgrid and save it here. It might have to be encoded in base64.
I tried base64 encoded and it didn't work, so I tried without the encoding and it worked.
If your problem is not related to the authentication, you could review your DNS resolver, probably the problem would be there.
I've tried everything so far but I can't make the email server to work with my G-Suite (Google Apps or Gmail) in Prestashop.
I have a G-Suite paid account that is working. I can send and receive emails. My email address is: email#mydomain.com.
I've tried leaving the first section blank "domain name" with no luck.
I've tried using smtp-relay.gmail.com instead of smtp.gmail.com with no luck
I've tried using SSL and TLS with ports: 25, 465, 587 and 2525 with no luck.
I even tried using a Gmail free account (myemail#gmail.com) and it doesn't work.
I always get the following error:
Error: Por favor compruebe su configuraciĆ³n
Connection could not be established with host smtp.gmail.com [php_network_getaddresses: getaddrinfo failed: Name or service not known #0]
What am I doing wrong or what am I missing?
I was able to make it work. I am not completely sure how, but I disabled G-suite's 2 way verification and insecure apps and configured the smtp with smtp.gmail.com, email#mydomain.com, password, TLS and port 587 and it finally worked.
I am trying to send emails from my Odoo 10 installation. For this I have configured the outgoing mail server with Gmail SMTP as follows:
SMTP Server: smtp.gmail.com
SMTP Port: 465
Priority: 10
Connection Security: SSL/TLS
I have also configured my Gmail account to accept less secure connections from outside and when I run the test from Odoo's email configuration menu I get the following message:
Connection Test Succeeded! Everything seems properly set up!
BUT: If I try to send a real mail with Odoo I get the following error reason:
Mail Delivery Failed
Mail delivery failed via SMTP server 'localhost'.
error: 111
Connection refused
I don't know what to do, I searched for it on the internet but found nothing. Hope somebody can help me. Many thanks in advance.
From the error its clear that Odoo is trying to send emails using "SMTP server 'localhost'".
By default Odoo will create a localhost server in outgoing mail configuration menu. So you must set the "Priority" field in the form. Set the GMail server priority as "1"and localhost as "2" or any other value.
Priority: The priority of your mail server. The lower the number the
higher the priority. This will mean that the e-mail server with the
lowest number will be used the most.
I configured exim mail server on centos. It is working with no encryption type. But not with SSL and TLS. I din't get correct solution for this type of error. Can anyone tell solution and why this error message in exim main.log file?
The error message is like below in the exim main.log file.
2015-03-17 10:34:16 SMTP protocol synchronization error (input sent without waiting for greeting): rejected connection from H=acp-node [10.7.2.137] input="\026\003\001"
(input sent without waiting for greeting) ... input="\026\003\001"
In short: You are trying to use implicit TLS on a port where explicit TLS is needed.
In detail: There are two ways to use TLS with SMTP:
implicit TLS, that is TLS from start. This is used on port 465 (smtps). This mode is in some SMTP stacks simply called "SSL".
explicit TLS, that is start with plain SMTP and upgrade to TLS with the STARTTLS command. This is used on ports 25 (smtp) and 587 (submission). This mode is in some SMTP stacks simply called "TLS".
If you look around at the questions regarding use of SMTP with TLS you will find lots of confusion about how to use these modes with the various setups. And you will find lots of bad code which tries to use implicit TLS where explicit TLS is needed.
What you see is the result of the client trying to use implicit TLS on a port not suitable for this. \026\003\001 (or hex 16 03 01) is the start of a TLS 1.0 handshake and input sent without waiting for greeting refers to the fact, that the client is sending data first without waiting for the server to send the (plain text) SMTP greeting.
Judging from the error log entry, your mail client 10.7.2.137 is trying to establish a secure (TLS) connection but your Exim server is not expecting it.
Most probably, TLS is not configured properly in your Exim configuration file. You can refer to http://www.exim.org/exim-html-current/doc/html/spec_html/ch-encrypted_smtp_connections_using_tlsssl.html for tutorial.
The solution is, therefore, to edit your Exim configuration file, making sure TLS certificates are defined and tls_advertise_hosts is set; and then restart Exim.
I am able to send email using my gmail account from my grails application but when I use MS exchange server account I am getting this error
Message: Mail server connection failed; nested exception is com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp.exg6.exghost.com/, 25; timeout -1;
Configuration I used is :
mail {
host = "smtp.exg6.exghost.com"
port = 25
username = "xxxx"
password = "xxxx"
props = ["mail.smtp.auth":"true",
"mail.smtp.socketFactory.port":"25",
"mail.smtp.socketFactory.class":"javax.net.ssl.SSLSocketFactory",
"mail.smtp.socketFactory.fallback":"false"]
I am not sure what configuration to use. I tried changing port to 465 & 993 but that didn't work too. Please help
There are several things wrong with your setup. First of all, you are submitting mail to a Microsoft Exchange server (presumably), not Outlook. Outlook is a mail client and only provides end user functionality by connecting to the same server that you are trying to get the Mail plugin to connect to.
Your host name must be a valid Internet DNS host name -- therefore it must be "smtp.exg6.exghost.com". This might be all you have to do depending on the submission/relay policies in your SMTP server. Most likely you need to read on.
The SMTP protocol supports authentication and security for mail submission (new message injection) using either SSL or SASL. If you are using SSL, the default port to connect to is 465 (SMTPS port). If you are using SASL, then most servers are configured to accept new mail with authentication on port 587 (submit service port). Most SMTP servers will not accept mail submission on port 25.
In your case it looks like you are trying to connect with SSL, so you probably want to configure it using the SMTPS setup. To make sure that you have a proper setup, use a mail client like Thunderbird to try to make an SMTP connection to the server. It actually has a discovery algorithm in it that will try the common setups and report success when it has found one. Once you know what the connection parameters are, then you can proceed with configuring the Mail plugin.
I finally got this working. Turns out Microsoft provide a separate API / web-services to send email and perform all other mail related operations. This API gives developers programmatic access to Exchange Online, Exchange Online as part of Office 365, and versions of Exchange starting with Exchange Server 2007 Service Pack 1 (SP1). Click here for details.
exg6.exghost.com is host for Exchange Server 2007
And I am not sure but I think Exchange server 2007 and onwards don't use SMTP.