[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cobalt-users] Reply to in Form mail



Hello James,

> My website is riordon.ca and the main site on the server is 
> amigo-3.com. How can I change the 'From' and 'Received' fields to 
> reflect that the form is coming from riordon.ca and not show 
> amigo-3.com.

I've just had a look at the script on www.bignosebird.com and it's apparent
that you can specify the "From:" address using a form element named
"submit_by", probably best done by using a hidden field. Look at the
README.TXT for the script, it's detailed there. Alternatively, you could
hard code it. Search for the following two lines in the script:

    print MAIL "mail from: <$fromaddr>\r\n";
and
    print MAIL "From: $fromaddr\n";

change $fromaddr to whatever address you want, but remember to \ the @, so
use me\@myaddress.com

With regards to the "Received:" fields, I don't believe that there is
anything that you can do about this short of renaming your server. This
field is prepended to the mail header as it passes through different MTA's.
The MTA for your server is represented by your servers name, this has
nothing to do with the domain name from which the email was sent to or from.
It's intention is to provide the mail recipient a delivery path so that it
can be backtracked through the servers the mail passed through from its
origin to its destination.

> Any suggestions, or perhaps a better script if any one knows of one, 
> will be appreciated.

There are masses of such scripts available (I'd recommend
http://www.perlarchive.com - NOT www.cgi-resources.com since this is only
updated with the authors friends scripts these days and has not effectively
been updated for over a year now with the current crop of CGI products) and
none of them will have any effect whatsoever on the "Received:" field. The
"From:" field should be a common option to configure with just about all of
them, and a simple modification to those that aren't is easy to make.

Regards,
Jonathan Michaelson

Way to the Web Ltd
Commercial CGI Scripting, Web Hosting
http://www.waytotheweb.com