Simple Quick question, sendmail...

my code:
$mail{From} = 'nstouch<nobody@localhost.localdomain>'; $mail{To} = 'administrator <pyrox_pro@hotmai +l.com>'; #$server = 'xx.xx.xx.xx'; BEGIN { $| = 1; print ""; } END {print "not ok 1\n" unless $loaded;} $loaded = 1; if ($server) { $mail{Smtp} = $server; } $mail{Subject} = "NStouch has a message for yo +u..."; #$mail{Subject} = "Mail::Sendmail version $Mai +l::Sendmail::VERSION test"; $mail{Message} .= "Hello, \n "; $mail{Message} .= "\nNStouch wants to notify y +ou that: \n"; $mail{Message} .= "\n [ $dater ][ TEST ON $na +meserver WAS COMPLETED: SERVER DOWN ][ TIME : $us2 Miliseconds ] "; $mail{Message} .= "\n Thanks! \n \n $mailcount +er \n"; # Go send it if (sendmail %mail) { #print "content of \$Mail::Sendmail::l +og:\n$Mail::Sendmail::log\n"; if($Mail::Sendmail::er +ror) { print " \n OH DANG! \n + Senmail Errors \n ";
}

How do I kill the message content? Every time this app sends a message, it includes the previous message as well, this is really driving me insane. After the DNS server failes all day I end up with an email 300 lines on. Do I need to kill this header, or close the mail function?

Thanks in advance.

In reply to Simple question, sendmail... Kill Previous by PyroX

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.