473,804 Members | 3,126 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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********@noti ce.com' instead of what I want:
'From: we*******@notic e.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********@vte xt.com";
$subject = 'Report ';
$message = $php_message;
$headers = 'From: we*******@notic e.com' . "\r\n" .
'Reply-To: no*****@notice. com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();

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

Aug 21 '05 #1
3 2267
ra*********@pri memail.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********@noti ce.com' instead of what I want:
'From: we*******@notic e.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********@vte xt.com";
$subject = 'Report ';
$message = $php_message;
$headers = 'From: we*******@notic e.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*******@notic e.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*********@pr imemail.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********@noti ce.com' instead of what I want:
'From: we*******@notic e.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********@vte xt.com";
$subject = 'Report ';
$message = $php_message;
$headers = 'From: we*******@notic e.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*******@notic e.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********@noti ce.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*********@pri memail.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*******@notic e.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********@noti ce.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.sourc eforge.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
18293
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 "127.0.0.1". 4. Authentication: "Anonymous access" only. 5. Outbound connection listen to TCP 25. Besides,
2
2657
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 dotnet code plz.... help me
8
2012
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 running on the local machine. What am I missing to make this work reliably?
13
21340
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 to connect with my localhost mailserver? can anyone help me with this? thanks in advance..(^_^)
0
1546
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 problem is . please help 1) I am very new to SMTP configiration on my own Windows XP PC. How do
3
3730
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 problem is . please help 1) I am very new to SMTP configiration on my own Windows XP PC. How do I configure to send mails. We Use Lotus Notes as our mail. Please
4
1966
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 never comes, so i need your help with me, and here is my script: mail.htm code: <form method="POST" action="mail.php" onSubmit="">
6
1879
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 e-mail. The e-mail address are under the $addr and the information that I whish to put in the e-mail message are held in $msg I have installed and have working Sendmail the script that I have come up with so far is
1
6860
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 mail externally to a internet email site like Gmail the PDF is sent but is corrupted because CDOSYS ends up using binary encoding rather than Base64 encoding when creating the attachment. More information here: Anthonys Code My knowledge of ASP...
7
9848
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 achieve this. Thanks
0
9705
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10564
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10308
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10073
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9134
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5513
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4288
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3806
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2981
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.