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 [email protected] 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  "[email protected]" <[email protected]>

reply-to  [email protected] 

to  [email protected] 

date  5 Feb 2007 16:25:53 -0500 

subject  [LV] testing 

mailed-by  server.myservername.com

 

Link to comment
https://forums.phpfreaks.com/topic/37204-mail-questions/
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
https://forums.phpfreaks.com/topic/37204-mail-questions/#findComment-177777
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

"[email protected]" (where [email protected] 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: [email protected]" - it doesn't work that way, though.

 

Link to comment
https://forums.phpfreaks.com/topic/37204-mail-questions/#findComment-177799
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
https://forums.phpfreaks.com/topic/37204-mail-questions/#findComment-177809
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
https://forums.phpfreaks.com/topic/37204-mail-questions/#findComment-177895
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.