But the other 1%(ish) of my mail is not being sent. By putting my own address as well as the client's in the To: field, I have determined the fault is in sending, rather than receiving.

In the event of failure, I'd like to learn what happened. I don't want the script to stop nor any message sent back to the browser. If it didn't seem stupid, the ideal would be if it emailed me!! I suppose what I have to do is write a log file. But how? The syntax of "warn" doesn't seem to allow for that.

If it's possible, and depending on what the error turns out to be, I'd like the script to retry queuing the failed mail, at least a few times.

Anyone got any advice?

Or maybe know the right question I should be asking the webhost's tech support. After listening to their music for an hour I finally got someone who asked me what the errorlog said - and was utterly scornful when I said I wasn't writing one. I would have thought the webserver would maintain errorlogs from SendMail. Was his contempt for me justified, or was he BSing me?


In reply to SendMail works 99% of the time by Elliott

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.