reply email header for phone replies

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
MinDFreeZ
Forum Commoner
Posts: 58
Joined: Tue Feb 14, 2006 12:28 pm
Location: Lake Mary, FL

reply email header for phone replies

Post by MinDFreeZ »

I'm actually trying to figure how to force the reply email to be something inputted by a user... validating the email using regex shouldn't be a problem, as this has been discussed all over and I can find it somewhere on this forum...

the problem is that 1, I dont know how to use headers (im still pretty new to all this).. and 2, I don't know how to make the phone receieve it as a reply email correctly..... right now it shows up zinc.something .. something.. which is the server name or something like that... I don't really know..

if anyone wants to help me setup the reply headers the only thing now that is mailed is

Code: Select all

$realMessage = stripslashes($_POST['message']);
$message = "From:" . $name . " | " . $realMessage;
the full source is here:
http://enhancedworks.com/sendText2.phps
(it's a very simple script, because I really don't know much else to use for these things..)

Basically, when they hit reply..... I want it mailed to the email specified by the user.
if the phone cannot send email, it obviously will not send.. I don't care about that.

Code: Select all

$headers = "From: " . $name; 
$headers .= "<" . $email . ">\r\n"; 
$headers .= "Reply-To: " . $email . "\r\n"; 
$headers .= "Return-Path: " . $email;
Is that all I can really do? or is that unsafe to do.....
MinDFreeZ
Forum Commoner
Posts: 58
Joined: Tue Feb 14, 2006 12:28 pm
Location: Lake Mary, FL

Post by MinDFreeZ »

yea.. so I tried that....... and it still shows up nobody@pass47.diznc.com or whatever... it's the server name.. i can't make the damn reply work.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

If your header looks like this:

Code: Select all

From: "Some Name" <my@email.com>
Reply-To: this@address.com
It will work.
MinDFreeZ
Forum Commoner
Posts: 58
Joined: Tue Feb 14, 2006 12:28 pm
Location: Lake Mary, FL

Post by MinDFreeZ »

bleh, guess it's just the way the phones email works..... it shows up the server name...

nobody@theservername.com
oh well.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

I would test it by sending yourself an email and reading the headers. If it shows up like that in Emails to yourself, I would think that something is misconfigured on that server. I'm pretty sure it shouldn't do that.
Post Reply