--- randy Peterman <[EMAIL PROTECTED]> wrote:
> I am trying to develop a page to allow people on a list that I am a member
> of to subscribe and unsubscribe by clicking a link.  The link spawns a
> window that allows the user to type in their email address.  When they do
> that they can submit the form.  Sendmail seems to be replacing certain parts
> of the email header with its own info (specifically the From field).  The
> Email server for the list will only allow emails from the person's address
> to unsubscribe them.  Here is the code that is piped to Sendmail:
> 
> my $To = '[EMAIL PROTECTED]';
> #prepare message
> $msg = qq|To: list-serv\@domain.com
> Subject:
> #$Action = (un)Subscribe, $list = the email list, $To is the server info.
> $Action $List $To|;
> #end list-serv message
> 
> #send it to the mail server
> open (SENDMAIL, "| /usr/lib/sendmail -t -i -f'$UserName'") || die "Can't
> open Sendmail: $!";
> print SENDMAIL $msg;
> close SENDMAIL;
> 
> Any ideas?  Do I need to send more info?
> 
> Randy Peterman

Randy,

Rather than trying to use SENDMAIL, try one of the CPAN modules like Net::SMTP or 
something
similar.  It's easy to use and ensures greater code portability.

I have to ask:  where are you getting the $UserName value?  What you are trying to do 
raises some
serious security issues if done incorrectly.

Cheers,
Curtis "Ovid" Poe

=====
Senior Programmer
Onsite! Technology (http://www.onsitetech.com/)
"Ovid" on http://www.perlmonks.org/

__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to