Sender email not in "From" field

3 replies
Joined: 07/21/2007
User offline. Last seen 1 year 23 weeks ago.

I don't know why, but the senders email doesn't get formatted into the "From" field of the Header.

Instead, it prints this:

From:httpd@web136.opentransfer.com

How do I fix this?

Thanks,
Robert

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 06/04/2007
User offline. Last seen 1 day 46 min ago.

It's a two fold feature.

1) It allows things like Sender Permitted From (SPF) to work properly.
2) If someone is spamming through your site, it allows for a better trace back to your server.

I have run into a few people who want to change it for sorting reasons in their mail program. To fix it just take the variable from the reply-to line in the formmail.php file and replace the variable on the From line with it (It's ok to leave the reply-to line the way it is, it shouldn't hurt anything).

Andrew M Riley

Joined: 07/21/2007
User offline. Last seen 1 year 23 weeks ago.

Hi Andrew,
Thanks for the response. You'll have to pardon me, but I'm not a PHP programmer, so you'll have to be a little more specific. I found what I think is the right area, but I'm not sure:

$mail_header = 'Return-Path: ' . eregi_replace($email_replace_array,'',$return_path) . $mail_newline;
if (FROM != null)
$mail_header .= 'From: ' . FROM . $mail_newline;
$mail_header .= 'Reply-to: ';
if (isset($realname))
$mail_header .= $realname . ' <' . eregi_replace($email_replace_array,'',$form['email']) . '>' . $mail_newline;

If you could tell me exactly where the change needs to be, I would appreciate it. I don't want to screw things up.

Thanks,
Robert

Anonymous

Place the following just under the credits information, put your own info in and that should work if I understand correctly what you are trying to do.

// To change the address the e-mail comes from use define('FROM', 'Example Name ');

define('FROM', 'Example Name ');

Good Luck with it!

User login