Try ERPNext Buy Support Partners Foundation

Setting up Email - smtp server

I recently installed erpnext on my VPS, and have been testing ERPNext before we go live. Installed erpnext using the install script on Github

When we create invoices, ERPNext prompts to email the invoices, however the email never reaches the recipient nor throws up any error when we hit the SEND button

When I attempted to setup a gmail account as smtp server, gmail blocked the access “Someone just tried to sign in to your Google Account XXXXX@gmail.com from an app that doesn’t meet modern security standards”

You have mentioned to use mandrill, however, I wish to understand why cant ERPNext just use the built-in smtp server on the Linux VPS like that on Odoo and if it can, please provide how to get this done.

You can use gmail by enabling access to less secure apps: https://support.google.com/accounts/answer/6010255?hl=en

Gmail wants everyone to move to its API driven email sending/pulling instead of smtp. We haven’t done the necessary changes in the code yet.

If you want to use local smtp server, use “localhost” as server in your email account for outgoing emails and port as 25. Keep the login id and password as blank.

-Anand.

3 Likes

Hey team,

We are having problems with out Outgoing emails…Seems as though a password may have been reset on the Google Apps account being used for SMTP…as a result we have tried to update the password however we constantly get:
‘Invalid outgoing mail server or port’

Settings are:

Email ID: GoogleApps Email Address
Pass: Tested via Gmail

Service: Gmail
Enable Outgoing: YES
SMTP Server: smtp.gmail.com
Use TLS: Yes
Port: 587

Please let me know what we can do here…any suggestions?

Kind regards,

@reciphergroup do you get “Invalid outgoing mail server or port” when you save the Email Account or do you get it when you try sending emails?

Thanks for reply Anand.

Only get the error message when I try to save the Email Account. I THINK the user reset their password and I really just noticed I was not receiving my daily report…Tried to update the password however now I always get the error message. I have even tried another account (Yahoo) but same issues…

Is there the option to set your own SMTP Server (it seems now we can only select from the drop down list)…

When trying to save the Email Account itself…

@reciphergroup you can select empty in ‘Services’ and try

Hai Sir,

I have uploaded all the datas in ERP next in Buying module once all process only all data’s have been entered and finaly if we click submit mail page is opening with po,date, and mail id also but the thing is mail is not working even it is clearly showing as your message has been sent but is not receiving to any one.please help me shorting this issue.

This just makes the whole ERP implementation a big failure.
Please resolve this mail setup issue.
Its very irritating as it just doesn’t work for any email domain.

@Aniket_Shinde1 you refer to this?

Do respond when you are offered help or advice…

1 Like

Is there a way to troubleshoot emails? I migrated my server and my mails are not going through anymore. Went through the smtp unblocking process, and cleared the gmail errors but I still can neither send nor recieve emails. I’ve setup gmail and also tried zoho but no errors showing up.

“cleared the gmail errors”

So you are aware then that gmail is a bit fussy.

“I’ve setup gmail and also tried zoho but no errors showing up”

Likely a closed port ‘firewall’ prevents you from connecting. A forum search of say ‘gmail setup’ will turn up numerous troubleshooting tips.

Thanks @clarkej

Yeah, I’ve played around with Gmail + ERPNext a little now, I think I’ve got it fairly well.

I’ll continue with your suggested forum search for now but think the issue could be on my scaleway server, because Zoho is acting the same.

Thanks. If you have any other ideas I’ll be happy to hear them.

Setting my user’s email account as default am able to receive and send emails, but not otherwise. Is there a known solution or ideas for this one?

As was the case for this user.

UPDATE

9/11/17 - I cant point to the cause of my solution but after enabling the scheduler and renewing my sites ssl certifiicate I’m now able to send and receive via gmail.

logs/worker.error.log notes what background_job ran when for eg pull_from_email_account when the scheduler runs at say 15 minute intervals

Hi
i am facing the issue like this

Invalid Outgoing Mail Server or Port

also i have one question can we setup multiple outgoing email account if yes how ?
please help

Thanks

hi clarkej

i want to ask u can we setupe multiple outgoing email account ?if yes how?
please help
while sending email i got an error Invalid Outgoing Mail Server or Port
email are in queue but not send
Thanks

AFAIK, You can only set 1 Sender Email from ERP.
Also check with your email provider the SMTP details if it is not able to resolve the domain name then enter the IP address of the smtp server.

If you’re using Gmail then make sure you have less secure app allowed.

Thanks for the reply
yes i use gmail and less secure app is also allow.
Actually in my scenario i setup one default outgoing account which is ok ,also i setup on another account using that account i want to send the email so using that account i am not able to send the email … can u please guide to me for the email setup …
help for this

Thanks

i have same problem with gmail, can not send email through smtp, i’ve tried less secure app and app password with no result. i’ve tried other email services such as zoho, custom email hosting, aws workmail, etc. so far none of them worked. After several try, error, search then i found sendgrid and sparkpost can both work as outgoing mail, i can send email through their service (though it ended on spam not inbox). try one of them and i believe you’ll be fine.

here are the setting for sendgrid:

email1