I may be misunderstanding the question because I am not too familiar with APScheduler, but it sounds like you want to use mailer.send_to_queue(message) instead of mailer.send(message).
As long as you're sending it to the queue for later processing there shouldn't be any need to have multiple Mailer instances. When you install pyramid_mailer you'll also get a bin/qp script to process mail in the queue, and you can control how and when you run that on a schedule. -Eric On Sat, Mar 16, 2013 at 1:23 AM, Vincent Catalano < vinc...@vincentcatalano.com> wrote: > I'm attempting to setup pyramid_mailer with a website I'm developing. The > current documentation ( > http://docs.pylonsproject.org/projects/pyramid_mailer/en/latest/) > recommends creating a single instance of the Mailer and adding it to the > configuration setup. However, I want to configure numerous jobs that will > run separately from the Pyramid web application using something like the > Python APScheduler that will also send emails out to users. Instead of > having two separate Pyramid Mailer instances in the app, I would like to > abstract the email system into something more like a service . My primary > goal is to use the same Mailer configuration for my scheduled services as > my Pyramid application since this more clearly follows the principal of > Don't Repeat Yourself. Any ideas on how I could accomplish this? > > Thanks for your help! > > -- > Vincent Catalano > > -- > You received this message because you are subscribed to the Google Groups > "pylons-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to pylons-discuss+unsubscr...@googlegroups.com. > To post to this group, send email to pylons-discuss@googlegroups.com. > Visit this group at http://groups.google.com/group/pylons-discuss?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss?hl=en. For more options, visit https://groups.google.com/groups/opt_out.