473,775 Members | 2,621 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

php mail() not sending to mail Clients (ie, Outlook, Apple Mail,thunderbir d, etc..)

I have a send mail script on my site that.

The emails are recieved by gmail, and yahoo, but not to mail clients
like Outlook, Mail, etc...)

Is this a problem with the script, or is it something I must change in
php ini file?

Thanks in advance for any help.

here is the code. (im using it in conjunction with javascript for some
AJAX stuff)

if(!isset($_GET['action']))
{
die("You must not access this page directly!"); //Just to stop people
from visiting contact.php normally
}

/* Now lets trim up the input before sending it */

$name = trim($_GET['name']); //The senders name
$to = trim($_GET['maily']); //The senders email address
$place = trim($_GET['place']); //The senders email address
$subject = "you have recieved mail";
$headers = "From:$name ";
$message = "{$name} deemed you worthy of receiving the following
information/exchange from Trumpet.\n\n Follow This Link {$place}";
mail($to, $subject, $message,$heade rs); //a very simple send

echo 'contactarea|<p class="sent">Ar ticle Sent!</p>'; //now lets
update the "contactare a" div on the contact.html page. The
contactarea| tell's the javascript which div to update.

?>

Nov 30 '07 #1
3 2213
MW
shybe wrote:
I have a send mail script on my site that.

The emails are recieved by gmail, and yahoo, but not to mail clients
like Outlook, Mail, etc...)

Is this a problem with the script, or is it something I must change in
php ini file?

Thanks in advance for any help.

here is the code. (im using it in conjunction with javascript for some
AJAX stuff)

if(!isset($_GET['action']))
{
die("You must not access this page directly!"); //Just to stop people
from visiting contact.php normally
}

/* Now lets trim up the input before sending it */

$name = trim($_GET['name']); //The senders name
$to = trim($_GET['maily']); //The senders email address
$place = trim($_GET['place']); //The senders email address
$subject = "you have recieved mail";
$headers = "From:$name ";
$message = "{$name} deemed you worthy of receiving the following
information/exchange from Trumpet.\n\n Follow This Link {$place}";
mail($to, $subject, $message,$heade rs); //a very simple send

echo 'contactarea|<p class="sent">Ar ticle Sent!</p>'; //now lets
update the "contactare a" div on the contact.html page. The
contactarea| tell's the javascript which div to update.

?>
It's not a problem with the mail() function if some e-mail clients are
getting it. Maybe something to do with your e-mail formatting:

$headers = "From: $name"; should probably be
$headers = "From: \"$name\" <$email>";

Also the code snippet as you posted would be very vulnerable to script
attacks, I suggest more secure code.
Nov 30 '07 #2
On Nov 29, 9:34 pm, MW <m...@w.invalid wrote:
shybe wrote:
I have a send mail script on my site that.
The emails are recieved by gmail, and yahoo, but not to mail clients
like Outlook, Mail, etc...)
Is this a problem with the script, or is it something I must change in
php ini file?
Thanks in advance for any help.
here is the code. (im using it in conjunction with javascript for some
AJAX stuff)
if(!isset($_GET['action']))
{
die("You must not access this page directly!"); //Just to stop people
from visiting contact.php normally
}
/* Now lets trim up the input before sending it */
$name = trim($_GET['name']); //The senders name
$to = trim($_GET['maily']); //The senders email address
$place = trim($_GET['place']); //The senders email address
$subject = "you have recieved mail";
$headers = "From:$name ";
$message = "{$name} deemed you worthy of receiving the following
information/exchange from Trumpet.\n\n Follow This Link {$place}";
mail($to, $subject, $message,$heade rs); //a very simple send
echo 'contactarea|<p class="sent">Ar ticle Sent!</p>'; //now lets
Thanks so much for the response. I tried your suggestion, and Its
still isnt working.
I also tried to remove the header variable,and still no luck.

As for the insecure code. I plan on securing. I'm just trying to get
the overall functionality to work.

Any other suggestions would be greatly appreciated.

best
update the "contactare a" div on the contact.html page. The
contactarea| tell's the javascript which div to update.
?>

It's not a problem with the mail() function if some e-mail clients are
getting it. Maybe something to do with your e-mail formatting:

$headers = "From: $name"; should probably be
$headers = "From: \"$name\" <$email>";

Also the code snippet as you posted would be very vulnerable to script
attacks, I suggest more secure code.
Nov 30 '07 #3
shybe wrote:
On Nov 29, 9:34 pm, MW <m...@w.invalid wrote:
>shybe wrote:
>>I have a send mail script on my site that.
The emails are recieved by gmail, and yahoo, but not to mail clients
like Outlook, Mail, etc...)
Is this a problem with the script, or is it something I must change in
php ini file?
Thanks in advance for any help.
here is the code. (im using it in conjunction with javascript for some
AJAX stuff)
if(!isset($_G ET['action']))
{
die("You must not access this page directly!"); //Just to stop people
from visiting contact.php normally
}
/* Now lets trim up the input before sending it */
$name = trim($_GET['name']); //The senders name
$to = trim($_GET['maily']); //The senders email address
$place = trim($_GET['place']); //The senders email address
$subject = "you have recieved mail";
$headers = "From:$name ";
$message = "{$name} deemed you worthy of receiving the following
information/exchange from Trumpet.\n\n Follow This Link {$place}";
mail($to, $subject, $message,$heade rs); //a very simple send
echo 'contactarea|<p class="sent">Ar ticle Sent!</p>'; //now lets

Thanks so much for the response. I tried your suggestion, and Its
still isnt working.
I also tried to remove the header variable,and still no luck.

As for the insecure code. I plan on securing. I'm just trying to get
the overall functionality to work.

Any other suggestions would be greatly appreciated.

best
>>update the "contactare a" div on the contact.html page. The
contactarea | tell's the javascript which div to update.
?>
It's not a problem with the mail() function if some e-mail clients are
getting it. Maybe something to do with your e-mail formatting:

$headers = "From: $name"; should probably be
$headers = "From: \"$name\" <$email>";

Also the code snippet as you posted would be very vulnerable to script
attacks, I suggest more secure code.
depends on the receiving MTA. AOL silently drops "suspicious "
emails, for example.

bill
Nov 30 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
12090
by: Google Mike | last post by:
I've got RH9 Linux with default PHP. Is there a way to send email on Linux to an Exchange Server from PHP and/or other tools when there is *NOT* SMTP access? Has anyone figured out a way to use PHP to get inside an OWA (Microsoft Outlook Web Access) website to send email that way? The reason I ask is because my corporate office is going to do away with our rogue SMTP server access and force everything through Exchange
5
2357
by: Abhishek | last post by:
I have a client list in my addressbook I have to send all of them mails. Is there a way in which i can read my addressbook entries and send all of them a mail I want all this functionality in C# or vb f possible can i send a mail directly to a contact group for example i have created a group with the name of clientlists which has all my clients grouped together. Abhishek
3
5588
by: dale zhang | last post by:
Hi, I write an asp.net web application. It has a “Contact Us” page, where users fill in their email, subject and text and hit send. Then the email will go to my hard coded yahoo email account. I was using optimum online service with smtp server as “mail.optonline.net”. I can receive email correctly. Now I switch to verizon DSL. I change my smtp server accordingly as
1
2876
by: Nick Gilbert | last post by:
Hi, I'm writing a Windows Forms application in .NET and I need to send an e-mail from it. As it's NOT asp.net, I don't have access to an SMTP server so I will have to send the e-mail using Simple MAPI. I can't seem to find a way of doing this in .NET as it seems .NET has no MAPI support (amazingly!). How can I reliably send an e-mail from a Windows Forms app from .NET?
3
1722
by: Mike Caputo | last post by:
I'm setting up an auto e-mailer in VB.NET to send daily reports to clients. I have the main part of that all set, but there are a couple of things I'm not quite sure on: 1) I'll be sending about 10-20 reports, and am not quite sure how to queue them. The reports are anywhere from 500K to 3MB, so I imagine this is fairly important. Does the SMTPMail object handle this automatically, or do I need to implement something to wait for each...
11
1843
by: Dennis | last post by:
I am using the following code that I got from this newsgroup to start a user's default e-mail editor and it works ok. However, I would like to attach a file to the editor (like using word as editor) Dim psi As New ProcessStartInfo psi.UseShellExecute = True psi.FileName = "mailto:" & HttpUtility.UrlEncode() & "?subject=" & Subject & "&body=" & Message Process.Start(psi)
15
8592
by: cj | last post by:
How can I get a button in VB to send the contents of a text box via email in a manner similar to the "Send To\Mail Recipient" functionality that you can select via right clicking a file in Windows Explorer? I want the user to click a button and it lunch the users default email client and put the contents of a multi line text box in the body of the message and the contents of another text box in the title box and be sitting there read for...
3
1861
by: Ibrahim. | last post by:
Hello, Im getting the following error when mail is sent from ASP.NET 2.0 website. CDO.Messaging componenet is used for sending mail. " The message was not able to be transmitted to the SMTP server. The forwarding error code is 0x800ccc67. The response from the server is as follows. 421 service not available, closing transmission channel
14
4844
by: luc.saffre | last post by:
Hello, the simplest way to launch the user's standard mail client from a Python program is by creating a mailto: URL and launching the webbrowser: def mailto_url(to=None,subject=None,body=None,cc=None): """ encodes the content as a mailto link as described on http://www.faqs.org/rfcs/rfc2368.html
0
9622
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, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9454
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9916
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...
1
7464
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6718
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5360
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...
0
5486
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4017
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
3
2853
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.