Mail headers with php mail()

I’m setting up a feature for my users which will allow them to receive an email link to reset their password if they forget it. The php mail() feature works just fine, except that when looking at the email headers, my dreamhost username is listed in the Return-Path and Received-SPF fields. Call me paranoid, but I don’t want that happening. Is there a setting dreamhost has that can avoid this?

Does “Example 2. Sending mail with extra headers.” at work?

I’ve tried that and the resulting email simply has two instances of each header field.

I’m wondering if I just have to accept this.

I recall encountering exactly this problem in the past, from memory it was resolved by using the optional ‘additional_parameters’ parameter of mail() to pass the sender address to sendmail.

Something like…

mail( $to, $subject, $message, null, ‘’ );


Save [color=#CC0000]$50[/color] on DreamHost hosting using promo code [color=#CC0000]SAVEMONEY[/color] ( Click for promo code details )

Yes, that’s it! I don’t know what I did wrong when I tried this previously.

Thanks to both Tor and Mark :slight_smile: