473,381 Members | 1,456 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,381 software developers and data experts.

Why cannot send the MIME html e-mail to gmail?

hello guys, i have met a problem that i can send the html e-mail by
using MIME via php to yahoo mail and hotmail, but when i was try to
send to gmail, it show all the html coding.
can someone help me to solve this kind of problem? thank you
the coding i made----->:

<?php
$a=<<<A
<form action="" method="post">
<input type="submit" name="submit" value="submit">
</form>
A;
echo $a;
if(isset($_POST['submit']))
{
$to = 's*******@gmail.com,st*******@yahoo.com';

$subject = 'Testing';

$message = '
<html>
<head>
<title>Birthday Reminders for August</title>
</head>
<body bgcolor="gray">
<p>MIME email!</p>
</body>
</html>
';

$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1'."\r\n";
$headers .= 'Content-Transfer-Encoding: 7bit'."\r\n";

$headers .= 'From: ck <st*******@yahoo.com>' . "\r\n";

mail($to, $subject, $message, $headers);
echo "Email had been sent!";
}
?>

your kindly help is important to me! ^_^

Apr 25 '06 #1
13 5172
"stam" <st******@gmail.com> wrote:

hello guys, i have met a problem that i can send the html e-mail by
using MIME via php to yahoo mail and hotmail, but when i was try to
send to gmail, it show all the html coding.
can someone help me to solve this kind of problem? thank you


Well, your e-mail headers are valid. If you will permit the obvious
question, is your gmail account configured to display HTML email?

You might try making the email multipart/alternative with a text/plain
section and a text/html section. You shouldn't have to do that, but it's
the most common way to do HTML mail.
--
- Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Apr 27 '06 #2
Thank you for giving me a solution, but how to making the section,
because when i using boundary gmail also show whole coding that i
writen. Can u post the example for me.
Thanks again for your kindly help. ^^

Apr 29 '06 #3
"stam" <st******@gmail.com> wrote:

Thank you for giving me a solution, but how to making the section,
because when i using boundary gmail also show whole coding that i
writen.


Again I ask, are you sure that your gmail account is configured to display
HTML e-mail at all?
--
- Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Apr 29 '06 #4
I didn't configured anything in gmail, is it default to display HTML
email?
and where to configured it? because i cannot find it.

Apr 29 '06 #5
"stam" <st******@gmail.com> wrote:
I didn't configured anything in gmail, is it default to display HTML
email?
and where to configured it? because i cannot find it.


I don't know gmail at all, but the symptoms you describe seem to imply that
that gmail is just not displaying HTML email. Do you get ANY HTML email
that is displayed correctly?
--
- Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
May 1 '06 #6
yes, i get html email before, and it is display like html format, but i
just dun understand that why i can't send the html email to gmail, i
just can't figure out what happen? my supervisor is rushing me to
handle this problem as soon as possible, i'm having headache right now!
Could someone help me on this! thank you

May 3 '06 #7
Hello,

on 05/03/2006 02:32 AM stam said the following:
yes, i get html email before, and it is display like html format, but i
just dun understand that why i can't send the html email to gmail, i
just can't figure out what happen? my supervisor is rushing me to
handle this problem as soon as possible, i'm having headache right now!
Could someone help me on this! thank you


Your are probably not composing it correctly. You may want to try this
class for composing and sending e-mail message according to the Internet
standards.

http://www.phpclasses.org/mimemessage
--

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
May 4 '06 #8
"stam" <st******@gmail.com> wrote:

yes, i get html email before, and it is display like html format, but i
just dun understand that why i can't send the html email to gmail, i
just can't figure out what happen? my supervisor is rushing me to
handle this problem as soon as possible, i'm having headache right now!

Could someone help me on this! thank you


There was nothing wrong with your original headers. The only thing I can
suggest is witchcraft and superstition: move the "From" header before
MIME-Version, add a "To" header specifically, etc.
--
- Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
May 5 '06 #9
Thanks for your help. but i still cannot send it to gmail. Haiz~ is
this my fate or what! it just can't success............ Thanks for your
guys helping, but i still need solutions to solve this.

May 8 '06 #10
"stam" <st******@gmail.com> wrote:

Thanks for your help. but i still cannot send it to gmail. Haiz~ is
this my fate or what! it just can't success............ Thanks for your
guys helping, but i still need solutions to solve this.


Is your web site publicly available anywhere? I'd love to have it send an
e-mail directly to me so I can examine the actual headers that it sent.
--
- Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
May 10 '06 #11
i'm still testing the function, so it still didn't publicly. or u just
give me ur email address so i just send it to u. thanks

May 10 '06 #12
i'm still testing the function, so it still didn't publicly. or u just
give me ur email address so i just send it to u. thanks

May 10 '06 #13
"stam" <st******@gmail.com> wrote:

i'm still testing the function, so it still didn't publicly. or u just
give me ur email address so i just send it to u. thanks


Ummm, my e-mail address is in the signature of every post I make...
--
- Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
May 11 '06 #14

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

Similar topics

4
by: Bob | last post by:
Seem to have a problem ending a session. I get the following message. Warning: session_start(): Cannot send session cookie - headers already sent by (output started at...
3
by: Gene Ellis | last post by:
Hey everyone, I have a simple task. I want to take an XML file, pull out the elements in it, format them, and then send an html email based on it. What are the necessary steps? Any suggestions?...
2
by: bill | last post by:
Hi All, When I send html content with Excel MIME type, the page break style sheet {page-break-before: always} doesn't work at Excel spreadsheet. Any idea to convert html page break style sheet to...
4
by: Mark J. McGinty | last post by:
Greets, Part of the content of one of our web pages uses wingdings and Chr(239) through Chr(242) (which are little arrow outlines, though that's not really important.) It worked just fine in...
0
by: Klaus Bonadt | last post by:
I would like to parse an email, which I receive from a pop3 account. While the subject and the sender's email address are probably easy to determine, the body seems to be more difficult because of...
4
by: Daniel Sitima | last post by:
I cannot to create project in Windows Server 2003 with Visual Studio .NET 2003; The error returned was: The default Web access mode for this project is set to file share, but the project...
2
by: Tim Reynolds | last post by:
Team, When my web service throws an exception and I am debugging on my PC - I get the exception back in my browser fine. My web.config shows <customErrors mode="Off"/> and this is working well. ...
4
by: Sandman | last post by:
Hi there, So here is the situation I'm in. My PHP script does something like this: 1. Update a DB (only once) 2. Send some post data to another PHP script (only once) 3. Output some stuff...
5
by: =?Utf-8?B?SmFrb2IgTGl0aG5lcg==?= | last post by:
I have never sent attachment with webservices. Yesterday I got the challenge to redesign my solution that sends large XML structures to a Java webservice. The reason was that the Java SOAP...
13
by: =?Utf-8?B?Um9nZXIgTWFydGlu?= | last post by:
This is a follow-up to my post "Silverlight video doesn't work when file is streamed from handler in ASP.net" at...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.