Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins email could not connect failure

Tags:

smtp

jenkins

I have tried with various SMTP servers but I cannot get Jenkins to send an email. I get the could not connect error - nothing else, just this error.

See the screenshot below.

Any ideas why? I am using the Jenkins docker container, firewall is off.

I do not have an email server running inside the Jenkins container. I figure I don't need one if Gmail is going to send the email for me.

Image of stack trace from SMTP handler in Jenkins UI

like image 465
danday74 Avatar asked Nov 08 '22 01:11

danday74


1 Answers

Your Gmail configuration looks correct. Usually these issues come down to a firewall, but if you are sure that is not the problem it could be your Gmail account settings.

An additional configuration is required in the Gmail account from which the mail is being triggered. This step authorizes apps like Jenkins to use the Gmail account.

Gmail - Allowing less secure apps to access your account

After performing this step emails should be triggered successfully.

like image 101
lax1089 Avatar answered Nov 15 '22 05:11

lax1089