Can't Send Email From my locally Installed ERPNext

Hi there, I have installed ERPNext on my local machine but can’t seem to send emails from the system even though connected to the internet. Am I missing something? or the email works only on a cloud host?

Regards

I use gmail account works fine for me. may be issue with email setting.

I am also using gmail. But don’t know why it wouldn’t work! Here is my Email setting screenshot

Regards

Looks fine to me


This is mine setting

@Krys_Nuvadga do you get any error?

@rmehta I don’t get any errors. When I send emails, the recipients don’t see the emails in their inbox!

What is your setup (verison, production / dev)

@rmehta Im facing the same issue with Gmail and Office365 email accounts. Any fix?

All my emails are going to the Bulk Email list as Not Sent.

Thanks!

What’s the output of bench doctor

Hi @pdvyas,

Thanks so much for replying even on a weekend.

The output is:

Workers online: True
Pending tasks 0
Timed out locks:

and output for supervisorctl status is:

frappe:frappe-web                RUNNING   pid 15040, uptime 14:24:34
frappe:frappe-worker             RUNNING   pid 15039, uptime 14:24:34
frappe:frappe-workerbeat         RUNNING   pid 15050, uptime 14:24:34
node-socketio                    RUNNING   pid 14990, uptime 14:24:59
redis-async-broker               RUNNING   pid 14989, uptime 14:24:59
redis-cache                      RUNNING   pid 14991, uptime 14:24:59

Thanks!

Welcome :smile:

Okay, this looks good. Maybe the scheduler logs or worker.*.log in the logs dir bench have a clue.

The scheduler log is empty

worker.error.log and workerbeat.error.log files shows this from yesterday:

Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/frappe/frappe-bench/apps/frappe/frappe/celery_app.py", line 224, in <module>
    app.start()
  File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/celery/app/base.py", line 201, in start
    app=self).execute_from_commandline(argv)
  File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/celery/bin/celery.py", line 770, in execute_from_commandline
    super(CeleryCommand, self).execute_from_commandline(argv)))
  File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/celery/bin/base.py", line 311, in execute_from_commandline
    return self.handle_argv(self.prog_name, argv[1:])
  File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/celery/bin/celery.py", line 762, in handle_argv
    return self.execute(command, argv)
  File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/celery/bin/celery.py", line 694, in execute
    ).run_from_argv(self.prog_name, argv[1:], command=argv[0])
  File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/celery/bin/worker.py", line 179, in run_from_argv
    return self(*args, **options)
  File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/celery/bin/base.py", line 274, in __call__
    ret = self.run(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/celery/bin/worker.py", line 212, in run
    state_db=self.node_format(state_db, hostname), **kwargs
  File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/celery/worker/__init__.py", line 95, in __init__
    self.app.loader.init_worker()
  File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/celery/loaders/base.py", line 128, in init_worker
    self.import_default_modules()
  File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/celery/loaders/base.py", line 116, in import_default_modules
    signals.import_modules.send(sender=self.app)
  File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/celery/utils/dispatch/signal.py", line 166, in send
    response = receiver(signal=self, sender=sender, **named)
  File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/amqp/utils.py", line 42, in __call__
    self.set_error_state(exc)
  File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/amqp/utils.py", line 39, in __call__
    **dict(self.kwargs, **kwargs) if self.kwargs else kwargs
  File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/celery/app/base.py", line 330, in _autodiscover_tasks
    self.loader.autodiscover_tasks(packages, related_name)
  File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/celery/loaders/base.py", line 251, in autodiscover_tasks
    related_name) if mod)
  File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/celery/loaders/base.py", line 272, in autodiscover_tasks
    return [find_related_module(pkg, related_name) for pkg in packages]
  File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/celery/loaders/base.py", line 289, in find_related_module
    pkg_path = importlib.import_module(package).__path__
  File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ValueError: Empty module name

Does this help at all?

Do you have custom scheduled events in your apps?

@rmehta I haven’t set any personally. The default weekly digest is on, which hasn’t been coming either.
I’ve been trying to submit quotations, but the mail does not send. Instead they pile up under Bulk Email as “Not Sent”.

@pdvyas @rmehta Any way to solve this?

@Tanuj this is most likely due to a custom app. Hard to say without more details.

@rmehta I haven’t made any custom apps yet, I do all of my customisations through custom scripts… Is there any way for me to debug this?

custom edits. This is clearly non-standard AFAIK

@rmehta
This problem fixed itself 2 days ago for scheduled mails.

Still can’t send mails via Quotation

Any idea what’s causing this?

Thanks!

@Tanuj no idea. Most likely its something with your environment. You should have some logs (start with Scheduler Log, now in the Developer module)