You aren't composing the mail correctly (no From: header, no blank line between headers and body) and your ISP is adding one. As other people have said, please read the FAQ on this, because web->mail scripts have been a favourite source of errors for over a decade.

If you've ever run a web server and looked at the error logs, you'll see there are spammers still trying to find formmail.pl exploits from eons ago.

Your program in its current form might not be exploitable (hard to tell - since I don't know where you get $name from - if it's from the form can I enter ';rm -rf /' or similar and have some fun?) but things get extended over time and you may end up providing a spammer's gateway (or an exploitable hole on your ISP's webserver).

You might also want to look into taint checking if you haven't already. Have fun.


In reply to Re: Sendmail Help! by jbert
in thread Sendmail Help! by Anonymous Monk

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.