mail server configuration issues

I am running free version of stash on my localhost.I am trying to setup mail server configuration and i get an error.i get the error "Mail sending failed. Please verify the mail server configuration and check the logs for details". My hostname is localhost and Email from myemail@company.comand Recipient How can i fix the issue to create new users and send them notifications?

The log file details are attached below. (error.txt)

2 answers

0 votes

Hello Ram,

some parameter is wrong so you can't connect to your SMTP host. Please take a look here

If you need more help, please provide us more information about your account main setting.

Hope this helps,


Hi Fabio,

I am not sure what do you mean by account main setting.

Are u referring to my Directory configuration summary?

The parameters i am entering for setting up the server are

hostname: localhost

Email from


the log file details are in error.txt attached in my question.

Yes, you've not configured the connection to the mail server correctly.

Connection refused: connect. Failed messages: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;
is very clear - Jira is trying to connect to the sending mail server and can't because you have not given it the right server, password, user name, or port (or many of them)

Where are the user name and password? How did you set up the local mail server? 

Hi Ram,

Could not connect to SMTP host: localhost, port: 25;

Check if your SMTP server is up an running. Check if the process for the mail server is running and if it is, if its running on port 25.

You can test it using telnet:

# telnet


Hi Ram,

as Nic said, you need to check your SMTP settings. Please take a look here to retrieve gmail main settings

Hope this helps,


Thank You guys, let me try and get back to you all.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

1,946 views 7 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you