Hello there perl monks,

I am looking to write a quick sendmail replacement for use in other scripts. My problem is that I am working in an environment where I am limited to the number of emails I can send per hour. I want to make sure that I never exceed that limit. My hosting company tracks my number sent in an hour internally so I only get a notice from them when I exceed it. Since I have multiple applications running on the host that all may generate email (most PHP, some PERL), I wanted to have them send the mail to a central script that would ensure the max has not been reached and then either send the email using sendmail or queue it up for the next hour.

I know how to do all the counting and resetting stuff. Does anyone know how to make the script look like a sendmail like program as far as PHP’s mail functions are concerned?


In reply to mail counter by former33t

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.