Search code examples
pythonpython-3.xcelery

How to send email with celery without using django in python


I have a email.py this is okay, it works without celery. I want to make it work with celery for queue.

I can't find single tutorial for working with celery in python without django.

I have checked https://readthedocs.org/projects/celery/ but it is so confusing


Solution

  • from celery import Celery
    
    app = Celery('hello', broker='amqp://guest@localhost//')
    
    @app.task
    def send_email():
        #write your code here
    
    

    it is that simple.