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

This widget could not be displayed.

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,


This widget could not be displayed.

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 Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

1,238 views 8 11
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