Has anyone worked with the sendmail program before? I'm using a perl script which I got from http://www.pobox.com/~cgires/web2mail/, where you submit everything on an html form to this perlscript and the sendmail program then sends an e-mail to the specified recipient. This recipient's e-mail address is specified using a hidden input tag named ".email_target". The problem is that the "From" address is http@mydomain. I would like to know how to specify my own "From" address. This is critical, because we are using another program here that uses the e-mail address of the sender in the "From" field.
Thanks in advance.
specify the sender's e-mail address for sendmail program
Moderator: General Moderators
I had a look at that perlscript and what you need to do is to add a line in the &send_mail function just above the "To: $email_address", something like "From: $in{'from_address'} . In your html page you should then have an <input type='text' name='from_address'>. Whatever e-mail address the user types into this field will then be taken as the sender's e-mail address. I tested it on our server and it worked perfectly.