<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 4, 2015 at 11:35 AM, Andrew <span dir="ltr"><<a href="mailto:catalystgroup@unitedgames.co.uk" target="_blank">catalystgroup@unitedgames.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div bgcolor="#ffffff">
<div><font size="2"></font> </div>
<blockquote style="PADDING-RIGHT:0px;PADDING-LEFT:5px;MARGIN-LEFT:5px;BORDER-LEFT:#000000 2px solid;MARGIN-RIGHT:0px"><span class="">
<div style="FONT:10pt arial">one does not send any email directly as the
result of a browser interaction,</div>
<div style="FONT:10pt arial">but rather one notes that an email needs to be
sent (queues a job request),</div>
</span><div style="FONT:10pt arial">and a demon or cron job (a queue processor)
creates ands sends the mail.</div>
<div style="FONT:10pt arial"> </div>
<div style="FONT:10pt arial">----> So let's do this. How do we go about
it?</div>
<div style="FONT:10pt arial">Scenario - users want to be alerted via email
when a new job on a job board is posted.</div>
<div style="FONT:10pt arial">So we've a website that's a Catalyst app.</div></blockquote></div></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#ffffff"><blockquote style="PADDING-RIGHT:0px;PADDING-LEFT:5px;MARGIN-LEFT:5px;BORDER-LEFT:#000000 2px solid;MARGIN-RIGHT:0px">
<div style="FONT:10pt arial">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.</div>
<div style="FONT:10pt arial">So what am I doing?</div></blockquote></div></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#ffffff"><blockquote style="PADDING-RIGHT:0px;PADDING-LEFT:5px;MARGIN-LEFT:5px;BORDER-LEFT:#000000 2px solid;MARGIN-RIGHT:0px">
<div style="FONT:10pt arial">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?</div></blockquote></div></blockquote><div>If you're handing off the mail to exim, you're fine. Your implementation is correct for your use case</div><div><br></div><div>The initial admonishment about queue is all about not making a web client wait for your app to send an email as a result of some action by the browser For example, if the sign up for your service, queue a "send them a welcome email" job, and let the web request request return. Then a separate process sees that an email needs to be sent, generates the email and hands it off to exim. It's a different use case that the one you describe, and mostly it allows you to server more web requests by making the requests lighter.</div><div><br></div><div>So given that you're batch processing the email, we're back to resource exhaustion as the primary likely cause of error. So you can do less work per cycle (500 vs 3000), and/or debug the heck out of the process.</div><div>If you can get away with multiple 500s instead of 3000 all at once, then definitely go for it.</div><div><br></div><div>But you still might want to put a few scopes on the process to see if it's leaking memory ro doiong something else egregiously.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#ffffff"><blockquote style="PADDING-RIGHT:0px;PADDING-LEFT:5px;MARGIN-LEFT:5px;BORDER-LEFT:#000000 2px solid;MARGIN-RIGHT:0px"><div style="FONT:10pt arial"> 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?</div>
<div style="FONT:10pt arial">Or should I be looking for certain CPAN
mail queuing modules...?</div></blockquote></div></blockquote><div><br></div><div>Nah, you're good.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>_______________________________________________<br>
List: <a href="mailto:Catalyst@lists.scsys.co.uk">Catalyst@lists.scsys.co.uk</a><br>
Listinfo: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" rel="noreferrer" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a><br>
Searchable archive: <a href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" rel="noreferrer" target="_blank">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a><br>
Dev site: <a href="http://dev.catalyst.perl.org/" rel="noreferrer" target="_blank">http://dev.catalyst.perl.org/</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>Len Jaffe - Information Technology Smoke Jumper - <a href="mailto:lenjaffe@jaffesystems.com" target="_blank">lenjaffe@jaffesystems.com</a> </div><div>614-404-4214 <a href="https://www.twitter.com/lenJaffe" target="_blank">@LenJaffe</a> <a href="http://www.lenjaffe.com/" target="_blank">www.lenjaffe.com</a><br></div><div>Host of <a href="http://www.meetup.com/techlifecolumbus/" target="_blank">Code Jam Columbus</a> - <a href="https://www.twitter.com/CodeJamCMH" target="_blank">@CodeJamCMH</a></div><div><div>Curator of <a href="http://www.lenjaffe.com/AdventPlanet/" target="_blank">Advent Planet</a> - An Aggregation of Online Advent Calendars.<div><br></div></div></div></div></div></div></div></div></div>
</div></div>