email

17 views
Skip to first unread message

Tushar Nadkar

unread,
Nov 22, 2018, 4:29:53 AM11/22/18
to django...@googlegroups.com
i have email id of multiple user , so how can i send mail after 3 days when he click a button .or checkout button in django

Yavin Aalto Arba

unread,
Nov 22, 2018, 8:17:29 AM11/22/18
to django...@googlegroups.com

On Thu, 22 Nov 2018 at 11:29, Tushar Nadkar <tushar....@gmail.com> wrote:
i have email id of multiple user , so how can i send mail after 3 days when he click a button .or checkout button in django

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAAHYEvMrV2x2TOwL1NmDrJAxpxVSFU%2BkiyeaWPdYhF09SfzPTg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ryan Nowakowski

unread,
Nov 22, 2018, 4:53:07 PM11/22/18
to django...@googlegroups.com
On Thu, Nov 22, 2018 at 02:59:02PM +0530, Tushar Nadkar wrote:
> i have email id of multiple user , so how can i send mail after 3 days when
> he click a button .or checkout button in django

I record the timestamp of the button click in a model then I run cron
or celery periodically to query the model like this:

ready_to_email = MyModel.objects.filter(when_button_clicked__lte=timezone.now()-timedelta(days=3), already_emailed=False)

Then I use the django mail module to send the emails. Finally I record
that the emails were sent in the model(already_emailed = True) so they
don't get sent again.
Reply all
Reply to author
Forward
0 new messages