Click to See Complete Forum and Search --> : how to get from/date/subject to show in email


jamajam
06-26-2006, 05:49 AM
hi
i wonder if anyone can help with this small problem.

i'm using the bnbform cgi script link here (http://bignosebird.com/carchive/bnbform/bnbform.txt) and it's working fine so everything is set up correctly.

however, when the 'thank you' email is sent, no 'from' address is being shown, therefore it ends up in peoples junk mail folder as 'unknown' because 'no sender id could be verified'.

is there anything that could be added to the script to make this happen.
(the script is set up to send emails by $SMTP_SERVER="localhost"; )

also, i think this might be related, when receiving the form submission there is no 'sender' email address or date.

if it could be made so that at least the date is shown, that would be very handy :)

many thanks

Watts
06-29-2006, 05:16 PM
The easiest way is to find this line in the script:

print MAIL "From: $fromaddr\n";

and change it to:

print MAIL "From: you@yourdomain.com\n";

or whatever you want it to say.... otherwise you're having to rely on your "end users" to fill in the field on the web page (or pass it along as a hidden variable).

jamajam
06-29-2006, 05:25 PM
thanks very much - i'll give that a try :)

jamajam
06-29-2006, 06:14 PM
ummm, it didn't work, i'm afraid ...........

here's the part of the script which contains the bit you referred to

print MAIL "helo $SMTP_SERVER\r\n";
$_ = <MAIL>;
if (/^[45]/)
{
close(MAIL);
return(-5);
}
print MAIL "mail from: <$fromaddr>\r\n";
$_ = <MAIL>;
if (/^[45]/)
{
close(MAIL);
return(-5);
}

i tried my email address with and without the angle brackets but neither worked - just got an smtp error.

if you wouldn't mind, could you tell me please, how could i add it as a hidden field on the form?