ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Email Domain setup: request time out - Amazon Workmail

email

#1

ERPNext: v11.1.14 (master)
Frappe Framework: v11.1.14 (master)

Hi,

I have been trying to set up an email domain using Amazon Workmail IMAP settings (as per website) below:

When I click ‘Save’ the request times out after 15-25 seconds. The output below is what I get from Chrome’s developer tools: (I have checked the log files located in [my-bench]/logs for clarity on what is causing the issue with no success).

Please help. Thanks in advanced.

POST https://erp.steameservices.com/ 504
send @ jquery.min.js:4
ajax @ jquery.min.js:4
frappe.request.call @ request.js:199
frappe.call @ request.js:77
_call @ save.js:191
save @ save.js:25
frappe.ui.form.save @ save.js:217
(anonymous) @ form.js:755
Promise.then (async)
(anonymous) @ dom.js:249
frappe.run_serially @ dom.js:247
_f.Frm._save @ form.js:746
(anonymous) @ form.js:700
setTimeout (async)
(anonymous) @ form.js:699
_f.Frm.save @ form.js:693
Save @ toolbar.js:303
(anonymous) @ page.js:160
dispatch @ jquery.min.js:3
r.handle @ jquery.min.js:3
request.js:253 Unable to handle failed response
request.js:254 TypeError: Cannot read property ‘exc’ of undefined
at after_save (form.js:718)
at Object.error [as error_callback] (save.js:33)
at 504 (request.js:177)
at Object. (request.js:247)
at i (jquery.min.js:2)
at Object.fireWith [as rejectWith] (jquery.min.js:2)
at z (jquery.min.js:4)
at XMLHttpRequest. (jquery.min.js:4)
(anonymous) @ request.js:254
i @ jquery.min.js:2
fireWith @ jquery.min.js:2
z @ jquery.min.js:4
(anonymous) @ jquery.min.js:4
load (async)
send @ jquery.min.js:4
ajax @ jquery.min.js:4
frappe.request.call @ request.js:199
frappe.call @ request.js:77
_call @ save.js:191
save @ save.js:25
frappe.ui.form.save @ save.js:217
(anonymous) @ form.js:755
Promise.then (async)
(anonymous) @ dom.js:249
frappe.run_serially @ dom.js:247
_f.Frm._save @ form.js:746
(anonymous) @ form.js:700
setTimeout (async)
(anonymous) @ form.js:699
_f.Frm.save @ form.js:693
Save @ toolbar.js:303
(anonymous) @ page.js:160
dispatch @ jquery.min.js:3
r.handle @ jquery.min.js:3


#2

Hi, hoping to get some assistance here, thanks.

Here some troubleshooting done server side:

nc -vv imap.mail.us-east-1.awsapps.com 993
Connection to imap.mail.us-east-1.awsapps.com 993 port [tcp/imaps] succeeded!

nc -vv smtp.mail.us-east-1.awsapps.com 465
Connection to smtp.mail.us-east-1.awsapps.com 465 port [tcp/urd] succeeded!

I also tried telnet to these endpoints/ports and it worked as well which suggests it may not be a network access issue.

Maybe AWS’s workmail doesn’t allow just about any app to connect to it?


#3

Have same issue with Amazon Workmail


#4

I managed to set up an outgoing email account by using SES’s SMTP service instead of straight workmail servers and credentials.

I also noticed that if you use port 465 (as advised by AWS’s setup instructions) the request times out. Whereas with SMTP service from SES you have the option to use port 25, 587 and 465 (I used 587 over TLS).


#5

Hi Leonardo,

I am facing same issue with amazon workmail. Can you please help me how can I use SES and how do we configure that in ERPNext for outgoing email.

Regards,
Anindya


#6

Hi,

You first need to create SES - SMTP credentials. Go to you AWS console -> SES -> SMTP Settings -> Create My SMTP Credentials. Save them in a secured location.

Second, go to your ERPNext instance -> Setup -> Create Email Account. See below:

Email Address: “your-from@email.address”
Check "Use different Email Login Credentials:
Email Login ID: “ID provided when you created the SMTP Credentials on AWS”
Password: “Password provided when you created the SMTP Credentials on AWS”
Leave the below as is.

Check: “Enable Outgoing”
SMTP Server: “email-smtp.us-east-1.amazonaws.com
Check: “Use TLS”
Port: 587
Lastly, make sure you have the below checked:

I hope it helps buddy, this is only for outgoing email. Also, keep in mind that AWS sets you account to “Sandbox” mode, meaning you have limited features like 200 emails per day, only allowed to email registered email addresses/domains and a few more… You can later request AWS to move you out of the “Sandbox” but you need to complete some requirements… That is a different process.