Email domain not configured at google cloud hosted ERPNext

We tested on local frappe-bench setup that our company email domain is configured but when we try on hosted version then not configure email domain. What would be possible cause and any suggested solution?
Thanks in Advance

It is very difficult to use a non-google hosted email to set up email on a GCP instance due to port and firewall restrictions. I have several instances running on GCP so i know a bit about the challenge you are facing. In order to help figure out your issue i would like to know which email provide you use or if it is self-hosted.

1 Like

I used my company email domain It works on local frappe-bench but when I try to configure on vm which is hosted on google cloud then it gives error. What would be the solution?

Try to set up the email account without configuring a domain. Leave the domain field blank. When you check the box to enable outgoing, it will ask you to enter the outgoing parameters. enter the SMTP settings manually.

You can see from the example above that both the service and domain fields are blank. Also ensure that your mail security settings allows less secure apps (just to be sure that this isn’t the reason why it’s not working).

You mean SMTP settings of our domain to enter while enable outgoing ?

Yes. typically your SMTP settings will be if your email is self-hosted (either cPanel or on-site microsoft exchange). If however your email is hosted by Microsoft then your smtp should be or if it is GSuite then it will be confirm the right smtp settings for your email and enter it accordingly.

dear this solution is not working trying to save but dont save at all

Paste a screenshot of your configuration let me see

These are mail client info.

From what i can see, your email is hosted from within your website (typically web-hosted mails use as smtp gateway). I ran a check on your SMTP server and it doesn’t support TLS which means it uses the a non-secure SMTP port which is blocked by Google’s firewall.

I’m not too sure what port your SMTP port is. I would recommend you confirm that and set up a firewall rule on GCP to allow TCP connection through that port. That might solve the problem.

1 Like

Check the box “Use TLS” and enter port 465 although my initial checks suggest it doesn’t support TLS but there’s no harm in trying.

Same message as previous I already tested

As i suspected. The port is not open. These are the default ports open:

In order to get your email to work, you have to create a new firewall rule to allow connection through port 465.

1 Like

thanks a lot for your support but question is that how to create a new firewall rule to allow connection port 465? I have no words to say thanks to you