Greetings. My first supplication follows:
This form should subcribe an EMAIL to my ezmlm news list.
<FORM METHOD=POST ACTION="http://www.afoto.com/cgi-bin/boo/amail.cgi">
<INPUT TYPE="hidden" NAME="ELIST" VALUE="news-subscribe@afoto.com">
<INPUT TYPE="text" NAME="EMAIL">
<INPUT TYPE="submit" value="SEND">
</FORM>
Here is the snippet from `amail.cgi' that forwards the request:
.....
$email= $in{'EMAIL'};
$mserv= $in{'ELIST'};
........
&sendmail($mserv, $email, $subjekt, $bodd);
..........
sub sendmail
{
my($to, $from, $subject, $body) = @_;
open (MAIL, "|$sendmail_loc -t -oi") || &err_trap("Can't open
+$sendmail_loc!\n");
print MAIL "To: $to\n";
print MAIL "From: $from\n";
print MAIL "Subject: $subject\n";
print MAIL "$body\n";
close MAIL;
return 1;
}
It works, but only "sort of", and I can't see why. I'm new to Perl, feeling stupid.
There must be something obvious I'm overlooking.
1. If I pass a normal email address into the $to varible, then mail gets sent.
2. If I send a "manual" request for subscription to the list, it responds fine.
3. Possibly it also gets sent the way it is above, but the ezmlm list does not respond.
I'm at my feeble wits' end, and sure would appreciate any hints or help!
Dagfinn
Volda, Norway, where trolls dance on the telephonewires
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.