Or in simpler terms....
....my web app could just set a flag.
And I could have another perl script going as a cron job, that just checks the
flag every hour, to see if it needs to send out the emails or not.
I'm curious in that case, how such a separate script gets bundled in with your
Cataylst App, so you've got something you could move to another server easily
if ever necessary.
Best to keep it simple for now of course, without complicating the matter.
Have never written a perl script to run as a cron job before.
I assume it's just like writing a perl cgi script - put your shebang at the
top, and code like normal. The only difference is it's executed either as a
cron job, or just whenever you fancy by typing the command line to run it.
Just thinking out loud.
Thoughts will eventually settle into a course of action, I'm sure, ^_^.
----- Original Message -----
From: Andrew
To: The elegant MVC web framework
Sent: Friday, December 04, 2015 4:35 PM
Subject: Re: [Catalyst] Sending 3000 emails.
one does not send any email directly as the result of a browser interaction,
but rather one notes that an email needs to be sent (queues a job request),
and a demon or cron job (a queue processor) creates ands sends the mail.
----> So let's do this. How do we go about it?
Scenario - users want to be alerted via email when a new job on a job board
is posted.
So we've a website that's a Catalyst app.
At some point in the app, - when a new job post is being created - we note
that emails need to be sent to everyone who wanted a head's up on this event.
So what am I doing?
Am I using Email::Stuffer to send via sendmail, which on my system appears
to be handled by exim (which can be installed in place of sendmail)...? Or are
you saying using Email::Stuffer doesn't queue a job request - it just sends
instantly - in which case - how do you queue? Do I just write the source code
for the email, and the mysql statement to get the user's emails, to a text file
somewhere, in some directory, and let a Perl script running at set times via
cron, read in the files, and process them later?
Or should I be looking for certain CPAN mail queuing modules...?
------------------------------------------------------------------------------
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/