Email Domain Configuration

ERPNExt deployed in Google Cloud and everything is working perfect except Email configuration.

Email Service of company domain : GSuite
Transaction Mail sender : Sparkpost

To configure the email account from the company domain, system request to add a Email Domain. While adding Email Domain it ask for SMTP and IMAP address. In this fields tried to provide the imap.gmail.com and smtp.gmail.com. When the save button is clicked it takes long time and fails. During this save process will application try to contact the email server ? Since Google Cloud block all the email ports this may not work. So what is the best way to solve it?

If have to use Sparkpost how to provide the incoming(smtp/imap) email server ?

1 Like

@Arvindwill

Yes It verifies and if successful record gets saved.

If you are using GMail, you will need to allow connection from unsecured apps.

post:1, topic:22919"]
If have to use Sparkpost how to provide the incoming(smtp/imap) email server ?
[/quote]

Simply provide SMTP/POP information should do the work.

Simply provide SMTP/POP information should do the work.

Sparkpost didnt provided POP/IMAP details , so what your have to provide in imap server address textfield?

@Arvindwill

Did you try using standard Service provided?

And for incoming you can take GMail’s POP or IMAP.

If Standard Service Provider used, isnt required to create EMail Domain in the setup ?

@Arvindwill

Yes its not necessary.

What port number for SMTP in the Sparkpost Standard Service ? As there are restrictions on mail ports for Cloud Providers

@Arvindwill

If there is you will need with Sparkpost which SMTP port to use, you must have recommended settings given by Sparkpost.

1 Like

perfect Sparkpost worked, though it is bit slower compared to Sendgrid like to know is there any reason why Erpnext recommends it.

Thanks for solution @Nick

@Nick @arvind Hello, want to ask how you setup incoming email with this thread, i m using zoho as a host

Hi @Arvindwill I think you’ve been doing this all wrong. My ERPNext is hosted on google cloud as well and i use GSuite and email setup is by far the easiest configuration i had to do.

Before you configure the domain, ensure you enable connection to unsecured apps from your google admin. Force this policy on all accounts to ensure that no restriction exists.

to configure your email domain, it doesn’t matter if it is @mycompany.com so long as the mail service is GSuite, your incoming mail server is imap.gmail.com and your outgoing is smtp.gmail.com

ensure you also check the boxes Use IMAP and Use SSL under incoming and Use TLS under outgoing.

Also, there’s no need to specify the port as you did in your screenshot as since selecting Use TLS tells the system to select the default TLS port which is either 465 or 587. This is also standard for google cloud so you don’t need to configure any firewall parameters to allow connection through that port.

If you follow these steps above, your email domain setup should be saved in seconds unless of course there’s something else that has not been disclosed in this thread. See a screenshot of my configuration for reference:

1 Like

this is not working for me is there a setting more in a different file i have to do first?

I have try several ports.

For i forget erpnext is working on a virtual machine.

Greets Hans

I found that creating a GMail domain doesn’t work. So configure the email account directly, select enable outgoing to reveal the smtp settings and enter them there. Leave the domain and service selection options blank. It should work that way. See screenshot below:

Default sending and inbox where to find? i think the default sending and inbox i cant find only a empty page.

And we got our own email server with domain.

Go to Setup > Email > Email Account
Create a new Email Account
Select Service as SendGrid
Set your SendGrid Username and SendGrid API Key as the password
On saving the Email Account, SendGrid Integration app will attempt to create a Webhook in your SendGrid account

This route is what do and then i got this empty page see picture

Follow the bread crumbs on the top left corner of this screenshot, you will see new email. Fill in the required information (Leave the Domain and Service field blank if your mail is hosted by Gmail). Check the box Enable Outgoing and a new set of field will appear for you to enter the smtp information for Gmail. Be sure to check Use IMAP and Use TLS and enter the correct port numbers as shown the my previous screenshot:

Setup → Email Account

If you are using another Email provider though, i may be unable to help you further as i have not used any other provider apart from Gmail.

Good luck.

If do that than a white page is there see my picture and not able to fill in.

Then there’s something wrong with your installation. run bench update --reset lets see if it will fix the doctype not loading correctly

Must i restart something? this not helping me sorry.

Is everything else running on the instance?

The blank screen thing happened to me on Firefox. I switched to Chrome and it worked okay.

Later, I found out it was because my JS bundles had not built properly. Now it works on both.