<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="MSHTML 5.50.4807.2300" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>I also read on the sendgrid website that:</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>"With SMTP, 100 messages can be sent with each 
connection"</FONT></DIV>
<DIV><FONT size=2>and</FONT></DIV>
<DIV><FONT size=2>"Customers should utilize SMTPAPI if this is an option. As 
with SMTP, 100 messages can be sent with each connection, but there can be 1000 
recipients for each message."</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>...given that my attempt to send 3000 emails with nothing but 
my own VPS server, and Cpan's Email::Stuffer, only sent around 1000, before the 
plack/fastcgi/catalyst app crashed.... could I have been running into a similar 
limitation? I'm now thinking of altering my code to split the attempts to send 
email into six batches of 500 emails, as a short term fix, until I've had time 
to research which transactional email partner to use, and how their APIs work, 
or integrate with Catalyst apps.</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=lenjaffe@jaffesystems.com href="mailto:lenjaffe@jaffesystems.com">Len 
  Jaffe</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=catalyst@lists.scsys.co.uk 
  href="mailto:catalyst@lists.scsys.co.uk">The elegant MVC web framework</A> 
  </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Sunday, November 29, 2015 1:31 
  AM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Catalyst] Sending 3000 
  emails.</DIV>
  <DIV><BR></DIV>
  <DIV dir=ltr>I'll add that you should look into a transactional email partner 
  like sendgrid, mailgun, etc.&nbsp; They'll help you stay out of the 
  &nbsp;black lists by showing you what not to do, ans how to set up DKIM, etc. 
  for authentication of your email.
  <DIV><BR></DIV>
  <DIV><BR></DIV>
  <DIV>I use sendgrid professionally, with one of my cusotmers that sends a lot 
  of email.</DIV>
  <DIV><BR>
  <DIV>If your volume is under 10k emails per month, sendgrid is free, and they 
  have a templating feature which allows you to upload a template 
  (parameterizable) and let them to the mail merge on their servers, for up to 
  one thousand addresses per tx.</DIV>
  <DIV><BR></DIV>
  <DIV>So instead of generating 3000 emails and pushing them through your smtp 
  server, you'd upload the template file, and push three 1000-name lists to to 
  sendgrid and let them take care of delivery.&nbsp; Something to think 
  about.</DIV>
  <DIV><BR></DIV>
  <DIV>Len.</DIV>
  <DIV><BR></DIV></DIV></DIV>
  <DIV class=gmail_extra><BR>
  <DIV class=gmail_quote>On Thu, Nov 26, 2015 at 12:38 PM, Lasse Makholm <SPAN 
  dir=ltr>&lt;<A target=_blank 
  href="mailto:lasse@unity3d.com">lasse@unity3d.com</A>&gt;</SPAN> wrote:<BR>
  <BLOCKQUOTE class=gmail_quote 
  style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
    <DIV dir=ltr>Maybe not the answer you're looking for but I'd go with an 
    email service such as sendgrid which takes most if not all of the pain out 
    of sending emails. They have a simple REST API you can POST your email to 
    and provides callbacks for delivery notifications etc as well...
    <DIV><BR></DIV>
    <DIV>I'm not advocating sendgrid over any other service (I'm sure there are 
    plenty others) - it's just the one I have experience with... They apparently 
    have a free tier as well....<SPAN class=HOEnZb><FONT color=#888888><BR>
    <DIV><BR></DIV></FONT></SPAN>
    <DIV><SPAN class=HOEnZb><FONT color=#888888>/L</FONT></SPAN>
    <DIV>
    <DIV class=h5><BR>
    <DIV class=gmail_extra><BR>
    <DIV class=gmail_quote>On Thu, Nov 26, 2015 at 5:53 PM, Octavian Rasnita 
    <SPAN dir=ltr>&lt;<A target=_blank 
    href="mailto:orasnita@gmail.com">orasnita@gmail.com</A>&gt;</SPAN> 
wrote:<BR>
    <BLOCKQUOTE class=gmail_quote 
    style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><U></U>
      <DIV bgcolor="#ffffff">
      <DIV><FONT face=Arial size=2>A queue in Perl is better when there is a 
      need of sending thousand messages.</FONT></DIV>
      <DIV><FONT face=Arial size=2>Without a queue, if the Catalyst-based code 
      just sends the messages directly and a browser is waiting for a page to 
      load after the web app sent them, it may time-out. But otherwise it should 
      work and not crash the web app.</FONT></DIV>
      <DIV><FONT face=Arial size=2>3000 messages should be sent pretty fast if 
      they are sent to the local SMTP server, but not fast enough for a pleasant 
      experience.</FONT></DIV>
      <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
      <DIV><FONT face=Arial size=2>Regarding the success of those messages... if 
      you don't want them to reach in the spam folder, it helps to sign them by 
      using SPF/DKIM. If you'll find this complicated,&nbsp;a</FONT><FONT 
      face=Arial size=2> better solution might be to create an account on a site 
      like <A target=_blank href="http://mailgun.com">mailgun.com</A> or <A 
      target=_blank href="http://mandrill.com">mandrill.com</A> and send the 
      messages using their servers. They offer APIs that you can use in your app 
      very easy. <A target=_blank href="http://mailgun.com">mailgun.com</A> 
      allows sending 10,000 messages/month for free and after that limit the 
      prices are pretty cheap. You will have reports with the list of email 
      messages that bounced that you can get programaticly, plus a few other 
      helpful features.</FONT></DIV><SPAN><FONT color=#888888>
      <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
      <DIV>--Octavian<BR></DIV></FONT></SPAN>
      <BLOCKQUOTE 
      style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
        <DIV>
        <DIV>
        <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
        <DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial"><B>From:</B> <A 
        title=catalystgroup@unitedgames.co.uk target=_blank 
        href="mailto:catalystgroup@unitedgames.co.uk">Andrew</A> </DIV>
        <DIV style="FONT: 10pt arial"><B>To:</B> <A 
        title=catalyst@lists.scsys.co.uk target=_blank 
        href="mailto:catalyst@lists.scsys.co.uk">The elegant MVC web 
        framework</A> </DIV>
        <DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, November 26, 2015 
        5:32 PM</DIV>
        <DIV style="FONT: 10pt arial"><B>Subject:</B> [Catalyst] Sending 3000 
        emails.</DIV>
        <DIV><BR></DIV>
        <DIV><FONT size=2>Hello,</FONT></DIV>
        <DIV><FONT size=2></FONT>&nbsp;</DIV>
        <DIV><FONT size=2>You lot are all experts at Catalyst and 
        Perl,</FONT></DIV>
        <DIV><FONT size=2>and because I'm using Perl to code a Catalyst program, 
        I wanted to ask you about a problem I've encountered.</FONT></DIV>
        <DIV><FONT size=2></FONT>&nbsp;</DIV>
        <DIV><FONT size=2>The Catalyst app I'm coding is to replace a PHP 
        website, which presently allows an admin to manage sending out an email 
        to all members. The site has 3000 odd members. From what I could tell, 
        the PHP code was simply using the PHP mail function to send email 
        (although it did in my experience typically take two days for everyone 
        to receive an email sent with it).</FONT></DIV>
        <DIV><FONT size=2>I've also been asking other Perl programmers when I've 
        had the chance - and the only concerns raised, were about IP 
        blacklisting or emails bouncing back - not about actual code 
        working.</FONT></DIV>
        <DIV><FONT size=2></FONT>&nbsp;</DIV>
        <DIV><FONT size=2>So could sending 3000 emails be as simple as Matt's 
        old&nbsp;CGI&nbsp;form mail?</FONT></DIV>
        <DIV><FONT size=2></FONT>&nbsp;</DIV>
        <DIV><FONT size=2>I had a look on CPAN, and found the simple looking 
        Email::Stuffer,</FONT></DIV>
        <DIV><FONT size=2>and wrote a script,&nbsp;sending an email to myself, 
        and it worked.</FONT></DIV>
        <DIV><FONT size=2>I then modified the script to pick five email 
        addresses from a MySQL database, and email them, and again - it 
        worked.</FONT></DIV>
        <DIV><FONT size=2>Okay - one final change - throwing 3000&nbsp;email 
        addresses&nbsp;at it.</FONT></DIV>
        <DIV><FONT size=2>How does that do....?</FONT></DIV>
        <DIV><FONT size=2>Starts to work - then&nbsp;throws up an Internal 
        Server Error in the browser window,</FONT></DIV>
        <DIV><FONT size=2>and I find out my Fast CGI Plack Up server thingie 
        isn't up, nor running my&nbsp;Catalyst app anymore.</FONT></DIV>
        <DIV><FONT size=2>I have to type plackup and my details, etc, again from 
        the command prompt.</FONT></DIV>
        <DIV><FONT size=2>A log in to Web Host Manager (this is an apache2 VPS 
        with CPanel) and a check of the "View Sent Summary" shows 1020 emails 
        sent - 611 successful, 642&nbsp;deferrals and&nbsp;329 
        failures...curious, as that adds up to more than 1020, =S. If I click 
        through for more details, it shows 1582 records - some with green ticks, 
        and others with amber or red exclamation marks, ^_^.</FONT></DIV>
        <DIV><FONT size=2>I can worry about IPs and failure rates 
        later....</FONT></DIV>
        <DIV><FONT size=2></FONT>&nbsp;</DIV>
        <DIV><FONT size=2>....I just want to know why the whole FastCGI Plack 
        loaded Catalyst app came down half way through,</FONT></DIV>
        <DIV><FONT size=2>and how I can have a Perl script process sending 3000 
        emails without that happening every time, =S.</FONT></DIV>
        <DIV><FONT size=2></FONT>&nbsp;</DIV>
        <DIV><FONT size=2>Do I need to use a queue within Perl? Or does the 
        postfix/sendmail on the server, automatically queue everything for me? 
        If so - why did my code crash the Catalyst app, and&nbsp;not send all 
        the emails?&nbsp;&gt;_&lt;.</FONT></DIV>
        <DIV><FONT size=2></FONT>&nbsp;</DIV>
        <DIV><FONT size=2>I'm guessing this is a common problem - how does a 
        website email all its signed up members - and so there must surely be a 
        common solution among&nbsp;Perl / Catalyst users....?</FONT></DIV>
        <DIV><FONT size=2></FONT>&nbsp;</DIV>
        <DIV><FONT size=2>Any help, appreciated!</FONT></DIV>
        <DIV><FONT size=2></FONT>&nbsp;</DIV>
        <DIV><FONT size=2>Yours,</FONT></DIV>
        <DIV><FONT size=2>Andrew.</FONT></DIV>
        <DIV><FONT size=2></FONT>&nbsp;</DIV></DIV></DIV>
        <P></P>
        <HR>
        <SPAN>
        <P></P>_______________________________________________<BR>List: <A 
        target=_blank 
        href="mailto:Catalyst@lists.scsys.co.uk">Catalyst@lists.scsys.co.uk</A><BR>Listinfo: 
        <A target=_blank 
        href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</A><BR>Searchable 
        archive: <A target=_blank 
        href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</A><BR>Dev 
        site: <A target=_blank 
        href="http://dev.catalyst.perl.org/">http://dev.catalyst.perl.org/</A><BR></SPAN>
        <P></P></BLOCKQUOTE></DIV><BR>_______________________________________________<BR>List: 
      <A target=_blank 
      href="mailto:Catalyst@lists.scsys.co.uk">Catalyst@lists.scsys.co.uk</A><BR>Listinfo: 
      <A target=_blank 
      href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" 
      rel=noreferrer>http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</A><BR>Searchable 
      archive: <A target=_blank 
      href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" 
      rel=noreferrer>http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</A><BR>Dev 
      site: <A target=_blank href="http://dev.catalyst.perl.org/" 
      rel=noreferrer>http://dev.catalyst.perl.org/</A><BR><BR></BLOCKQUOTE></DIV><BR></DIV></DIV></DIV></DIV></DIV></DIV><BR>_______________________________________________<BR>List: 
    <A 
    href="mailto:Catalyst@lists.scsys.co.uk">Catalyst@lists.scsys.co.uk</A><BR>Listinfo: 
    <A target=_blank 
    href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" 
    rel=noreferrer>http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</A><BR>Searchable 
    archive: <A target=_blank 
    href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" 
    rel=noreferrer>http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</A><BR>Dev 
    site: <A target=_blank href="http://dev.catalyst.perl.org/" 
    rel=noreferrer>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 -&nbsp;<A target=_blank 
  href="mailto:lenjaffe@jaffesystems.com">lenjaffe@jaffesystems.com</A>&nbsp;</DIV>
  <DIV>614-404-4214 &nbsp; &nbsp;<A target=_blank 
  href="https://www.twitter.com/lenJaffe">@LenJaffe</A> &nbsp;<A target=_blank 
  href="http://www.lenjaffe.com/">www.lenjaffe.com</A><BR></DIV>
  <DIV>Host of&nbsp;<A target=_blank 
  href="http://www.meetup.com/techlifecolumbus/">Code Jam Columbus</A>&nbsp; - 
  <A target=_blank 
  href="https://www.twitter.com/CodeJamCMH">@CodeJamCMH</A></DIV>
  <DIV>
  <DIV>Curator of&nbsp;<A target=_blank 
  href="http://www.lenjaffe.com/AdventPlanet/">Advent Planet</A> - An 
  Aggregation of Online Advent Calendars.
  <DIV><BR></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV>
  <P>
  <HR>

  <P></P>_______________________________________________<BR>List: 
  Catalyst@lists.scsys.co.uk<BR>Listinfo: 
  http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst<BR>Searchable 
  archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/<BR>Dev site: 
  http://dev.catalyst.perl.org/<BR></BLOCKQUOTE></BODY></HTML>