473,473 Members | 2,031 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

email sent by php script has empty content in Thunderbird

Hi,

I have here some strange behaviour, when sending a mail out from my
php script. The mail is perfectly readable in MS Outlook, but has an
empty body when reading the mail with Thunderbird (version 1.5.0.12).
Using "View>Message source", one can see the body ...

The script used is :

************************************************** *********************************
$to="xxxxxxxx@xxxxxxx";

$link="http://www.yyy.zzz/test.html";

$from="xxxxxxxx@xxxxxxx";
$subject= "Test" ;
$message = "Test Test." ."\n";
$message .=" " ."\n";

$message .="Link Test" .$link."\n";
$message .=" " ."\n";
$message .=" " ."\n";

$headers = "From: " . $from . "\n" ;

// $headers .= "MIME-Version: 1.0\r\n";
$headers .= "MIME-Version: 1.0\n";
// $headers .= "Content-type: multipart/mixed; charset=iso-8859-1\r
\n";
$headers .= "Content-type: multipart/mixed; charset=iso-8859-1\n";
mail($to, $subject, $message, $headers);
************************************************** *******************************************
Can it be that it has something to do with the MIME or content-type ?
Or is there something wrong in the Thunderbird settings ?

Any information is more than welcome ...

Jun 22 '07 #1
3 2504
C.
On 22 Jun, 11:01, rukkie <ruk...@belgacom.netwrote:
Hi,

I have here some strange behaviour, when sending a mail out from my
php script. The mail is perfectly readable in MS Outlook, but has an
empty body when reading the mail with Thunderbird (version 1.5.0.12).
Using "View>Message source", one can see the body ...
<snip>
Can it be that it has something to do with the MIME or content-type ?
Or is there something wrong in the Thunderbird settings ?

Any information is more than welcome ...
I think you'll probably find its something wrong with MS Outlook -
you're not delimiting the sections of the body nor using an inline
disposition. Try sending an Email with attachments FROM thunderbird
and view the source.

C.

Jun 22 '07 #2
On Jun 22, 11:01 am, rukkie <ruk...@belgacom.netwrote:
Hi,

I have here some strange behaviour, when sending a mail out from my
php script. The mail is perfectly readable in MS Outlook, but has an
empty body when reading the mail with Thunderbird (version 1.5.0.12).
Using "View>Message source", one can see the body ...

The script used is :

************************************************** *********************************
$to="xxxxxxxx@xxxxxxx";

$link="http://www.yyy.zzz/test.html";

$from="xxxxxxxx@xxxxxxx";
$subject= "Test" ;
$message = "Test Test." ."\n";
$message .=" " ."\n";

$message .="Link Test" .$link."\n";
$message .=" " ."\n";
$message .=" " ."\n";

$headers = "From: " . $from . "\n" ;

// $headers .= "MIME-Version: 1.0\r\n";
$headers .= "MIME-Version: 1.0\n";
// $headers .= "Content-type: multipart/mixed; charset=iso-8859-1\r
\n";
$headers .= "Content-type: multipart/mixed; charset=iso-8859-1\n";

mail($to, $subject, $message, $headers);
************************************************** *******************************************
Can it be that it has something to do with the MIME or content-type ?
Or is there something wrong in the Thunderbird settings ?

Any information is more than welcome ...
Outlook is probably ignoring your headers, and rendering a default, TB
does tend to trip up on oddly formatted emails.
Are you sending attachments, is there more code than you've posted?
Try removing the mime and content-type, leaving only the From or
decide if you are sending plain text, and use that instead.
see http://en.wikipedia.org/wiki/MIME#Mixed for more.
Have you considered using the class phpmailer or another prewritten
(make sure its modern and has a good rep for security) class to
prepare and send mail of different kinds?

Jun 22 '07 #3
Thanks,

removing the MIME and content-type is the solution ...
Jun 22 '07 #4

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

Similar topics

3
by: Dave Smithz | last post by:
Hi there, Previously in my PHP code I was using Sendmail to send out emails to people in the MySQL DB. The requirement cam along to be able to send attachments and so I dug around for an easy...
1
by: Dave Calhoun | last post by:
I'm trying to send email from a php script (not my code) and the mail is being rejected by my isp's qmail server. It says that I have illegal crcr's where I should have crlf's. I'm not sure what to...
2
by: phptriad | last post by:
:confused: Allo buddy does any one know how ti fix this.. I was sent email using mail(...) and the message email was succesed, but when the server in my Internet Provider has trouble.... the message...
4
by: elampirai | last post by:
Hi, I did a feedback form in PHP. When i click the submit button, the form is submitted and the mail has been sent successfully and all the fields had been clear. But then if i click the...
0
by: Nico Grubert | last post by:
Hi there, I wrote a short python script that sends an email using python's email module and I am using Python 2.3.5. The problem is, that umlauts are not displayed properly in some email...
1
by: Steve Holden | last post by:
I'm having some trouble getting attachments right for all recipients, and it seems like Apple's mail.app is the pickiest client at the moment. It doesn't handle attachments that both Thunderbird...
6
by: cfish | last post by:
I'm trying to script my contact page and I have everything the way I want it however I cannot get my script to output Address, City, State, Zip & Phone Number when I get a email. It will output...
0
by: tourerukcom | last post by:
Hi i wonder if any one can help. I have script that that sends a email with mulitple attachments. It seems to work fine as i get the email with the attachments on. But other people i send it to...
3
by: virtualweb | last post by:
Hello: I need to send a bit of HTML and Javascrpt on the body of an email from my perl script in order to have the recipient get a link that will openup a new window with a PopUp. For some...
0
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,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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,...
1
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
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...

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.