473,395 Members | 1,422 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

PHP Mail() Help

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
3 2249
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
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

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

34
by: antonyliu2002 | last post by:
I've set up the virtual smtp server on my IIS 5.1 like so: 1. Assign IP address to "All Unassigned", and listen to port 25. 2. Access Connection granted to "127.0.0.1". 3. Relay only allow...
2
by: Abhi | last post by:
i need to create a user in web mail using dotnet coad by using webmailserver api ex: xxx is my webmail then i want to create to a user in that webmail xxx ex: yyy@xxx.com how i should do in...
8
by: Robert Dufour | last post by:
Dim message As New MailMessage("mymail@mydomain.com", "mymail@mydomain.com", "Test", "Test") Dim emailClient As New SmtpClient("localhost") emailClient.Send(message) The IIS server is...
13
Nert
by: Nert | last post by:
hello every one, i need help.. how can i use the mail() funtion in php? when ever i execute the mail function i continuesly receive this error message: what do i need to do in order for me...
0
by: Pav | last post by:
Hi, I am developing a small Intranet web application which needs to send mails to our coporate Ids. I am using CDONTS, But my mails never leave Que folder. Not able to find out what the...
3
by: Pav | last post by:
Hi, I am developing a small Intranet web application which needs to send mails to our coporate Ids. I am using CDONTS, But my mails never leave Que folder. Not able to find out what the...
4
by: shror | last post by:
dear all, i have started learning php 2 weeks ago and i have wrote my first script for mail sender and the script takes all my data and move to the thanks page but the problem is that the mails...
6
by: Guern1 | last post by:
Help Please I am very new to the Perl game and need some help I have a Perl application which works fine and can output some plain text information that I need to send to selected users via...
1
by: maxxxxel | last post by:
Hi Can anyone help me with some asp code , I changed the code to use CDO.message instead of the old cdont.sys to send mail from a ASP webpage which works fine. Our problem is that when we send...
7
by: undbund | last post by:
Hi I am creating a newsletter system. The software should run from desktop computer (localhost) but be able to send email to anyone on the internet. Can you guys give me some ideas on how to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.