Take the 2-minute tour ×

I have set up Hudson but I am having difficulties, getting it to send mails, I have provided an smtp server (the gmail smtp server) but if I do tests, I get this error.

Failed to send out e-mail

com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first.

I have seen some discussions on this in the forum when enabling tls through the command.

$ java -Dmail.smtp.starttls.enable="true" -jar hudson.war

How can you set tls to start if you are using hudson in tomcat? Is there some configuration file you can use?

share|improve this question

1 Answer 1

set your JAVA_OPTS to -Dmail.smtp.starttls.enable=true before starting your tomcat, if you're on unix you can just add


to your $TOMCAT_HOME/bin/catalina.sh (somewhere at the top). On Windows I would set this in the cmdline-Environment.

share|improve this answer
Dosent work for me JAVA_OPTS="-Dmail.smtp.starttls.enable=true" java -jar /usr/local/Cellar/jenkins/1.458/lib/jenkins.war. Am not sure where is $TOMCAT_HOME on my mac :( –  Pratik Khadloya Jun 3 '12 at 20:03
java -Dmail.smtp.starttls.enable="true" -jar /usr/local/Cellar/jenkins/1.458/lib/jenkins.war worked :) –  Pratik Khadloya Jun 3 '12 at 20:08

Your Answer


