Jump to content

mail() questions


goatboy

Recommended Posts

I was told i need to have the mailed-by part of the email set correctly to an email address as to prevent messages from being caught by spam filters.

I'm having trouble getting this to all work right.

I tried using -finfo@mydomain.com and that kinda worked but then the reply to address seemed to get messed up, it would try to reply to the person i sent it to.

Any ideas? Let me know if any more info is needed.

 

from  "info@mydomain.com" <info@mydomain.com>

reply-to  info@mydomain.com 

to  testing@gmail.com 

date  5 Feb 2007 16:25:53 -0500 

subject  [LV] testing 

mailed-by  server.myservername.com

 

Link to comment
Share on other sites

Not sure if this helps, but spam filters work by looking at the address of the SMTP server the emails are sent from, or any relays they pass through.  I dont think it is possible to define this, other then by the servers settings.  If its not a domain that can be found through a revers lookup, then the ip address will be checked.

 

As to the reply-to part, this field is not realy nessesery.  If its not there it will just assume it to be the from address.  Hope i havent got the wrong idea!  Who told you that you need to set this?

Link to comment
Share on other sites

it was by some random person that used a script i was testing, here's what they said

 

This is sort of like the address at the top of a business letter.

 

There is also an "envelope-sender" address, which shows up in the

Return-Path: header of the final message that the recipient receives.

This is added by the recipient's mail server and contains the address

that the mail server sent during the transaction. That's the address

that bounces will go to.

 

This is sort of like the address on the *outside* of the same letter -

if you respond to the letter, you'll probably use the address on the

letterhead... but the post office would return the letter to the return

address on the back of the envelope if the message were undeliverable.

Make sense sorta?

 

So the fifth param to mail() is "arguments to sendmail" - you can add

"-faddress@example.com" (where address@example.com is a valid address at

your domain) to set the envelope-sender address.

http://us2.php.net/manual/en/function.mail.php

 

A lot of people try to just add a header like

"Return-Path: blahblah@example.com" - it doesn't work that way, though.

 

Link to comment
Share on other sites

Im not realy sure what he is saying!  if you add - before the address most mail clients will tray to reply to an address with that at the begining.  If you leave the mailed-by it will use the server name. 

 

Perhaps you can clarify what your trying to do a little more?  Are your emails being blocked as they are?  Or is this just to tr and insure there not? (not possible!)  Or is it just one persions spam filter that does not like it?

 

 

 

Link to comment
Share on other sites

it was to insure that it wouldn't happen, but it looks like it's not something i have to worry about.

this is what he said

 

"Otherwise people's spam filters may score your message up, and some MTAs

may even reject the message entirely because the domain of the sender

address doesn't exist"

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.