Hi,
you wire up Post Office by switching out the EMAIL_BACKEND. That will
work out of the box with Oscar, as it uses Django's default send_mail
function.
Templating of the email will still be done in the view (which could be
slow for HTML mails), but generally you'll see a big speedup.
Regards,
Maik
On 23/12/13 17:00,
asi...@gmail.com wrote:
> Thanks for sharing.
> I noticed that sending emails takes ~2 seconds and I'm planning to move
> to Celery to use worker for sending emails.
>
> I'm interested, it would be nice if you could share it.
> did you hook it up with the current method oscar is sending out emails?
>
> thanks
>
> On Monday, December 23, 2013 3:26:07 PM UTC+2, Maik Hoepfel wrote:
>
> Hello,
>
> SMTP is a verbose protocol that requires many interactions before an
> email is sent; it can easily take 2+ seconds. This is unacceptable for
> views in Oscar and we recommend using a non-default email backend.
>
> From my experience with Bike Parts Market, I can recommend
>
https://github.com/ui/django-post_office
> <
https://github.com/ui/django-post_office>. It gives quick access to
> sent
> emails in the admin interface, and allows one to send emails
> asynchronously. Personally, I trigger the management command with a
> cron
> job that runs every minute. But if Celery is already running, one can
> use that instead.
>
> Post Office mainly uses email templates in the database. I've slightly
> adapted it to allow sending email from file templates. I'm happy to
> share that code if anyone is interested.
>
> Regards,
>
> Maik
>
> --
>
https://github.com/tangentlabs/django-oscar
>
http://django-oscar.readthedocs.org/en/latest/
>
https://twitter.com/django_oscar
> ---
> You received this message because you are subscribed to the Google
> Groups "django-oscar" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
django-oscar...@googlegroups.com.
> Visit this group at
http://groups.google.com/group/django-oscar.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/django-oscar/e710cc67-5c1d-461f-9e3d-1c1edb2e26f1%40googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.