PDA

View Full Version : From address in scripts/Frontpage



digilexic
05-20-2004, 11:17 PM
When mail is sent out from a CGI or PHP script or from a FrontPage Form, the from address is always accountusername@server.domain.com

For Example:

Say my domain is hotep.com, and my username is amon

I setup a mailer script to use sendmail.

There are three fields on the form: subject, returnemailaddress, message

The form is setup to fill the From: field with the value in returnemailaddress.

So lets say the data is this (Cool Site, kingtut@egypt.com, Where did you get the sarcophagus?)

The emails I am recieving have the correct Subject and message area filled out, but the From field ALWAYS says amon@server.hotep.com instead of kingtut@egypt.com

This also happens if I use a frontpage form and assign the from field to a field on the form.

How do I fix this?

nobaloney
05-21-2004, 05:54 AM
First, you're probably better off if the user isn't lsited as the sender:

If the sender is from an ISP that has published an SPF record (see here (http://spf.pobox.com/execsumm.html)), and the recipient (you, or anyone like you, who wants to get those form-to-email responses) gets email through an ISP who uses SPF, then you may never get the email.

But as far as doing it is concerned; that's not really a DA issue; it can be set using your CGI or PHP program, and is specific to your program and how it works.

We use a secure version of FormMail.pl, and we get email with the sender as the "From:" address.

(We don't use SPF to limit received email.)

Jeff

digilexic
05-21-2004, 05:56 PM
I have configured the script to use sendmail, and to place the value of the email field in the From: section, however, I still get the mail with the server address instead of the username.

These are the same scripts I have used on cpanel servers without a problem.

nobaloney
05-22-2004, 08:20 AM
I just did a test.

I want to my http://www.nobaloney.net/ website and I subscribed to my newsletter.

It came through using the from address I typed in at the website.

It's not really a subscribe form; I haven't figured out how to do that offering multiple mailing lists form the same form. So it's simply a copy of FormMail.pl, a secure version, running on a DA server hosting my account.

If you go ahead and try that, I'll send you back what I get from you, in an email to you, including the headers, so you can see exactly how exim on the DA server is handling it.

I can send you a copy of my FormMail.pl script, if you want it, so you can see how it's handling it.

If your scripts, which work elsewhere, don't work properly on your DA server it's probably some kind of incompatibility between the script and exim; you might want to ask for help on an exim list. You can find exim lists at http://www.exim.org/.

(Please be aware of my time limitations as posted in my sig and send me any requests quickly; I'm getting closer to my "leave" time, and I have less and less time to devote to these forums today.)

Jeff

digilexic
07-17-2004, 08:44 AM
I am trying to figure out how to solve this to no avail, Jeff any help you can offer would be greeted with a paypal payment.

nobaloney
07-17-2004, 09:48 AM
Digilexic,

I'm no longer away (I've been back for a while now), and I am available.

Please contact me privately, either by telephone (preferred) or email.

My contact information is below, in my sig.

Thanks.

Jeff