PHP Mail from address?

liammk

New Member
Messages
15
Reaction score
0
Points
0
Even when i specify the from address in php it still makes the from adress liammk@absolut.x10hosting.com
I dont want this. What is wrong with my code:
PHP:
// The message
$message = " bla, bla, bla, bla, bla";

$headers = 'From: no_reply@XXX.co.cc' . "\r\n" .
    'Reply-To: no_reply@XXX.co.cc' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();

// In case any of our lines are larger than 70 characters, we should use wordwrap()
$message = wordwrap($message, 70);

// Send
mail($emails, 'XXX', $message, $headers);

 
Last edited:

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
I copied/pasted your code (added $emails = "my address") and ran it. It showed up at gmail with the 'XXX.co.cc' from/reply-to .

gmail did show : mailed-by chopin.x10hosting.com

What server are you on?
 

liammk

New Member
Messages
15
Reaction score
0
Points
0
I copied/pasted your code (added $emails = "my address") and ran it. It showed up at gmail with the 'XXX.co.cc' from/reply-to .

gmail did show : mailed-by chopin.x10hosting.com

What server are you on?
lostus, i was testing it with gmail
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Just had a friend on Lotus try it and this is what my gmail says:

Code:
from	[email]no_reply@xxx.co.cc[/email]
reply-to	[email]no_reply@xxx.co.cc[/email]
to	[email]mygmailaddress@gmail.com[/email]
date	Wed, Apr 7, 2010 at 7:37 PM
subject	XXX
mailed-by	lotus.x10hosting.com

EDIT/ADD...

well, the two accounts I had my friends send from were yadda.x10hosting.com, not yadda.co.cc accounts.
 
Last edited:
Top