473,769 Members | 2,019 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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>Birthd ay 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*******@yaho o.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 5223
"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

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

Similar topics

4
14091
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 C:\xitami\xitami-24\app\webpages\logout.php:9) in C:\xitami\xitami-24\app\webpages\logout.php on line 10 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at
3
1760
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? I know how to write XSL style sheets. Most of my confusion lays in how to get the XML elements for matted and the transformed in such a form that is email-able. Thank you so much!
2
10031
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 Excel page break? Thanks in advance
4
2463
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 Windows 2000 Server, but now under Server 2003 it seems that characters above 127 get converted somehow, and our code no longer produces the desired effect.
0
2341
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 multi-part messages in MIME format. I am interested only in the plain text. Do you know an easy way to retrieve plain text of the body from an email message? Maybe a class, which can be constructed using the whole message string as a parameter...
4
1706
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 folder at 'http://localhost/WebApplication1' cannot be opened with the path 'd:\inetpub\wwwroot\WebApplication1'. The error returned was: Unable to create web project 'WebApplication1'. The file path
2
8145
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. However, when I test this web service on the deployment server, I only get 'The page cannot be displayed' instead of the exception. That is when I call the web service on the deployment server locally or remotely. The web.config on the...
4
1955
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 related to 1 and 2. I've done #2 by using input type="hidden" on a form, like so: print "<form action='../dir/register.php' method='post'
5
3260
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 implementation had problems consuming too large files that way. They encountered a memory leak in the parser that made the whole mainframe environment to crash! So the decided they should go for DIME attachments instead. I use VB.Net in VS2005.
13
4015
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 http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.dotnet.framework.aspnet&mid=e9a38d03-83a8-41fc-8950-5ee60d2a18a5. I have a web site under .NET 2.0 that renders videos using the Silverlight media player. When I stream the video file (.wmv) to the browser via a hard-coded link to the file,...
0
10205
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
9984
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
9851
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
8863
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
6662
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
5293
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
5441
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3949
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
3556
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.