By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,224 Members | 1,233 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,224 IT Pros & Developers. It's quick & easy.

PHP Mail() Help

P: n/a
I'm trying to send a Txt Msg to my Verizon cell phone using PHP
Mail(). I use a mail gateway that verizon has provided. It works OK -
but - the From string I see on my cell phone when I get the txt msg
always shows 'From: po********@notice.com' instead of what I want:
'From: we*******@notice.com.' Here is my code below. Does anyone know
why the From string is not being detected? I don't know if this is a
PHP issue, a notice.com domain settings issue or a Verizon issue.

$to = "88********@vtext.com";
$subject = 'Report ';
$message = $php_message;
$headers = 'From: we*******@notice.com' . "\r\n" .
'Reply-To: no*****@notice.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);

Aug 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
ra*********@primemail.com wrote:
I'm trying to send a Txt Msg to my Verizon cell phone using PHP
Mail(). I use a mail gateway that verizon has provided. It works OK -
but - the From string I see on my cell phone when I get the txt msg
always shows 'From: po********@notice.com' instead of what I want:
'From: we*******@notice.com.' Here is my code below. Does anyone know
why the From string is not being detected? I don't know if this is a
PHP issue, a notice.com domain settings issue or a Verizon issue.

$to = "88********@vtext.com";
$subject = 'Report ';
$message = $php_message;
$headers = 'From: we*******@notice.com' . "\r\n" .
'Reply-To: no*****@notice.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);


If you changed the $to to be your email address, what do the full
headers look like?

You can try to add the fifth parameter in the form

$fifth = '-f we*******@notice.com';
mail($to, $subject, $message, $headers, $fifth);

Also, instead of using "\r\n" for the line termination, just use "\n".
I know windows platforms like "\r\n", while UNIX/Linux like "\n".

Ken

Aug 21 '05 #2

P: n/a
On 21 Aug 2005 12:37:50 -0700, "Ken Robinson" <ke******@rbnsn.com>
wrote:
ra*********@primemail.com wrote:
I'm trying to send a Txt Msg to my Verizon cell phone using PHP
Mail(). I use a mail gateway that verizon has provided. It works OK -
but - the From string I see on my cell phone when I get the txt msg
always shows 'From: po********@notice.com' instead of what I want:
'From: we*******@notice.com.' Here is my code below. Does anyone know
why the From string is not being detected? I don't know if this is a
PHP issue, a notice.com domain settings issue or a Verizon issue.

$to = "88********@vtext.com";
$subject = 'Report ';
$message = $php_message;
$headers = 'From: we*******@notice.com' . "\r\n" .
'Reply-To: no*****@notice.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);


If you changed the $to to be your email address, what do the full
headers look like?

You can try to add the fifth parameter in the form

$fifth = '-f we*******@notice.com';
mail($to, $subject, $message, $headers, $fifth);

Also, instead of using "\r\n" for the line termination, just use "\n".
I know windows platforms like "\r\n", while UNIX/Linux like "\n".

Ken


Good suggestions Ken.

When I added the $fifth argument I got a Safe Mode warning and it
didn't go out.

I removed the \r's and while I'll keep them removed as I agree with
you, it made no difference.

What I've discovered is that the po********@notice.com string is the
Envelope Sender string - so Verizon is grabbing that instead of the
From or Reply To string. I don't know if I can control or alter that
Envelope Sender string or not???

Aug 21 '05 #3

P: n/a

ra*********@primemail.com wrote:
On 21 Aug 2005 12:37:50 -0700, "Ken Robinson" <ke******@rbnsn.com>
wrote:

You can try to add the fifth parameter in the form

$fifth = '-f we*******@notice.com';
mail($to, $subject, $message, $headers, $fifth);

Also, instead of using "\r\n" for the line termination, just use "\n".
I know windows platforms like "\r\n", while UNIX/Linux like "\n".

Ken


Good suggestions Ken.

When I added the $fifth argument I got a Safe Mode warning and it
didn't go out.

I removed the \r's and while I'll keep them removed as I agree with
you, it made no difference.

What I've discovered is that the po********@notice.com string is the
Envelope Sender string - so Verizon is grabbing that instead of the
From or Reply To string. I don't know if I can control or alter that
Envelope Sender string or not???


That's what the fifth argument does. In short, don't use safe mode.
You can try using the phpmailer class, found at
<http://phpmailer.sourceforge.net/>, but I'm not sure if that will
help.

Ken

Aug 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.