People have explained what's wrong with your web code. Now I'll explain what's wrong with your mail code!

An SMTP message is made up of a series of headers, followed by a blank line, followed by the body of the message. Just putting a blank line in your Perl source code is not sufficient to put a blank line in the e-mail message...

By and large, you should avoid talking to sendmail directly. Use a Perl module instead to save you from having to worry about the nitty-gritty details. Here's how you could send the message with Mail::Sendmail:

use Mail::Sendmail; sendmail( To => $to, From => $from, Subject => $subject, Body => <<END_OF_BODY, Name: $name EMail: $email Address_line_1: $address1 Address_line_2: $address2 City: $city State: $state Zip: $zip Home_Phone: $homephone Work_Phone: $workphone Type_of_Business: $business Goals: $goals Comments: $comments END_OF_BODY ) or print "Failed to send message [$subject] to [$to]: $Mail::Sendmai +l::error\n";

Hope this helps.

update: corrected a silly bug in the heredoc syntax (forgot the <<).


In reply to Re: Hand-rolled CGI mailto (use a module to send e-mail) by grinder
in thread Hand-rolled CGI mailto by prowebdesigner

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.