/bin/mail and other Unix/Linux user mail agents preserve the From address based on your login UID. There is no way to make them lie about the From address without modifying their sources. It's possible to setup domain masquerading with sendmail or qmail. That way you could fake the @some.com part. But sendmail, qmail and vpopmail rely on the underlying login UID to make the username part of the mail address. If you're root, then you can create a login account with the name of your liking and su to that account before sending mail.
However, I encourage you to dig into the installation and use of contributed, opensource perl modules, since you have before you a simplest opportunity for doing it that will payoff quick. -tristram -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, October 03, 2003 11:25 PM To: Teresa Raymond; [EMAIL PROTECTED] Subject: Re: cgi mail script anyone? I can't seem to get this script working. I just want a simple code so I can send mail that can change the reply address. I could get the command line /bin/mail working with a system("/bin/mail..."); but I could not change the From so it doesn't say [EMAIL PROTECTED] I don't want to open socket and send smtp or load some modules. Any ideas? my $mailprog = '/bin/mail'; my $tomail = '[EMAIL PROTECTED]'; my $frmail= '[EMAIL PROTECTED]'; #EMAIL open (MAIL, "|$mailprog") || die "Can't open mailprog.\n"; print MAIL "To: $tomail\n"; print MAIL "Reply-To: $frmail\n"; print MAIL "From: $frmail\n"; print MAIL "Subject: Inquiry Response Request\n\n"; print MAIL <<"PrintTag"; Please respond to the following inquiry: blah blah blah, message here PrintTag close(MAIL); thanks, rkl > At 07:14 PM 10/3/2003, you wrote: >>I need to send a mail from the cgi. It must be able to have a reply or >>sender as someone different from the local web owner (apache). My >>configuration: >> redhat 9/qmail/vpopmail >> >> The example below will be typically what I want: >> >>To: [EMAIL PROTECTED] >>From: [EMAIL PROTECTED] >>Subject: "hello support test" >>this is a test >>with all your support >> >>I see alot of parts but can't get it working. >>can someone put a little script together that does this? >> >>thanks, >>-rkl >> >>-- >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]