Try ERPNext Buy Support Partners Foundation

Problem sending email

when i enter bench doctor i get bellow message :

Inspecting workers and queues…

Finding locks…
Checking scheduler status…
Workers online: True
Pending tasks 0
Timed out locks:

Note: To view pending tasks, use bench dump-queue-status

and :
bench dump-queue-status

[
{
“total”: 0
}
]
Pending Tasks Queue

but when i enter bench enable-scheduler

Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 162, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
main()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands.py”, line 29, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands.py”, line 501, in enable_scheduler
frappe.init(site=site)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 121, in init
local.conf = _dict(get_site_config())
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 175, in get_site_config
raise IncorrectSitePath, “{0} does not exist”.format(site_config)
frappe.exceptions.IncorrectSitePath: 404: Not Found

Try running bench enable-scheduler with site

Like bench --site [sitename] enable-scheduler

@vjFaLk
Hello Thanks bench --site [sitename] enable-scheduler it’s work without error ,
But still email we send from erpnext in status show not sent , do you know what is issue ?
last night i restart bench after that email not send any more .
Regards

Can you run bench celery-doctor and paste the output here?

frappe@ubuntu01:~/frappe-bench$ bench doctor
Inspecting workers and queues…
Finding locks…
Checking scheduler status…
Workers online: True
Pending tasks 0
Timed out locks:

Note: To view pending tasks, use bench dump-queue-status
frappe@ubuntu01:~/frappe-bench$ bench celery-doctor
Queue Status

[
{
“total”: 0
}
]

Running Tasks

{
“async@ubuntu01”: [],
“jobs@ubuntu01”: [],
“longjobs@ubuntu01”: []
}

hi this is output

The email that weren’t sent, what error are they showing? Can you check by going to any of the unsent emails? Maybe it’s an email config issue.

Hi
email configuration is correct .
this is inside of one email :

Content-Type: multipart/mixed; boundary="===============9032796250743547284=="
MIME-Version: 1.0
Message-Id: <ca89
From: Meisam Negini Negini meisam@shoukinet.com
X-Frappe-Site: http://localhost:7001
CC:
To: info
Date: Fri, 08 Apr 2016 06:54:33 -0000
Reply-To:
Subject: Quotation: PI-00397

–===============9032796250743547284==
Content-Type: multipart/alternative;
boundary="===============4609129350694040490=="
MIME-Version: 1.0

–===============4609129350694040490==
Content-Type: text/plain; charset=“utf-8”
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable

=

enable schedule

localhost

Dear Abdul Kadar,

=

[fbe735061d87c3343d9e4f5289a3378a1eda5dc819551)

=

=

Leave this conversation: http://localhost:7001/api/method/frappe.email.bulk=
.unsubscribe?email=3Dinfo%&name=3DPI-00397&doctype=3DQuotati=
on&_signature=3D0d0000b4bdcae58650269232719621e7
–===============4609129350694040490==
Content-Type: text/html; charset=“utf-8”
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable

Quotation: PI-00397 <
This email was sent to i

Leave this conversation

<div style=3D"margin: 15px auto; text-align: center; color: #8d99a6=
--===============4609129350694040490==--

–===============9032796250743547284==
Content-Type: application/pdf
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=“PI-00397.pdf”

JVBERi0xLjQKMSAwIG9iago8PAovVGl0bGUgKP7/AEIAbABhAGMAawAgAFQAdQBsAGkAcAAgAEMA
bwBtAG0AdQBuAGkAYwBhAHQAaQBvAG4AIABTAHkAcwB0AGUAbQBzKQovQ3JlYXRvciAo/v8AdwBr
AGgAdABtAGwAdABvAHAAZABmACAAMAAuADEAMgAuADIALgAxKQovUHJvZHVjZXIgKP7/AFEAdAAg
ADQALgA4AC4ANikKL0NyZWF0aW9uRGF0ZSAoRDoyMDE2MDQwODEwNTQzMy

@vjFaLk Do you have any idea what’s problem ?

@neginy most likely, your email sending config has problems. If erpnext cannot reach the smtp server or if it times out, the status remains not sent, instead of error.

@anand
Hello Anand
Thanks for your reply , i check again my email setting and it’s correct , we can find any log why email not sent ?
i have two site in my local server , from last night in both site email not work any more .
last night only i edit site_config.json and add host_name so when we print pdf show letter head , then i restart server .
i guess after that email not work any more .
Regards

Check frappe-bench/logs/worker.error.log

I clear this file , and try to send email again , but there is nothing new in this log file :frowning:

try to telnet your mail server from the same server where you are having this issue on mail servers SMTP port and see if mail server responding well.

Hi
I use ZOHO mail server , bellow telnet output :

frappe@ubuntu01:~$ telnet smtp.zoho.com 587
Trying 165.254.168.48…
Connected to smtp.zoho.com.
Escape character is ‘^]’.
220 mx.zohomail.com SMTP Server ready April 8, 2016 12:41:53 PM PDT

Any one use email successfully with ZOHO mail server ?
different user can send email to contact from erpnext from his email address ???

1 Like

Hi
This problem from erpnext , you have to select account that you are going to send email as “Default Outgoing” and click on “Always use Account’s Email ID as Sender” , then only when you login to erpnext with user with default outgoing you can send email , if you login with other user and in email setting of other user clicked on “Always use Account’s Email ID as Sender” you can’t send email because sender not same with default outgoing email .
if you want to send email with other user too, for user with default outgoing uncheck on “Always use Account’s Email ID as Sender” too , then when you login with other user also you can send email , but sender not same user login to erpnext , sender is default outgoing email . .
i thing it’s problem of erpnext with secure email like ZOHO . .only possible to send email from one sender .
i have other suggestion : if you want to make sure your customer 100% will revive your email . send email with outlook express :smile:

1 Like

@ai_me
Hello
Thanks for your reply , i’ll check and update you .
Regards

Hi
You are right , today i check if same user i login to erpnext is default outgoing mail too , email will be sent . but if same user not default outgoing and in default out going user " Always use Account’s Email ID as Sender" not clicked , email will not send .
Some one know what is solution ???

1 Like

I am also using ERPNext with zoho mail and experiencing same issue.

Have you found solution to this?

Thanks.

1 Like

I’m Having the same issue as you @rushabh_shah82 and @neginy.

Setting my user as default am able to receive emails, but not otherwise. Please tell me you’ve found a way through this probelm.

Still cannot send.