i have a form that generates an email that gets sent to a specified person in our organization. the form is to collect names and contact information from parents to keep in touch with their college-age kids.

this is the code that generates the mail:

open(MAIL, "|/usr/sbin/sendmail -oi -t") or die "Can't open sendmail: +$!\n"; print MAIL "From: no-reply <webmaster\@domain.org\n"; print MAIL "Reply-To: $efrom\n"; print MAIL "To: recipient\@mailserver.com\n"; print MAIL "Subject: $esubject\n\n"; print MAIL $emessage; close(MAIL) or warn "sendmail didn't close nicely";
the value of $emessage contains the value of $efrom and displays correctly as whatever was entered into the email field, but the actual header content for the "Reply-To" field has the domain of our webserver tacked to the end, so it'll look like "parent@hotmail.com.hivelocity.net" whereas $efrom = "parent@hotmail.com". this also happens if i use $efrom in the "From:" field of the email header.

any ideas how i can get the reply-to to get sent correctly? what am i doing wrong?? i've used a similar script for many of my other forms, without any difficulty...

TIA, janaki


In reply to domain getting tacked onto email address?? 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.