user462208
user462208

Reputation: 23

deferred email sending in django?

Is there an easy way to be able to send an email at a later time, say Aug 1, 2012 6 pm? I have tried to read some documentation on django-mailer, but I could not get to an answer.

I am starting out in web development so may not be able to hack the existing application of django-mailer to get this done.

Upvotes: 0

Views: 366

Answers (1)

iMom0
iMom0

Reputation: 12921

Celery can fit your need.

First set up a celery task:

@task
def sendmail():
    pass

Send a mail later, an example from the doc:

from datetime import datetime, timedelta

tomorrow = datetime.now() + timedelta(days=1)
sendmail.apply_async(args=[], eta=tomorrow)

Upvotes: 1

Related Questions