473,699 Members | 3,239 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HTML formatted email errors

Hi,

I am generating a HTML formatted email in PHP, but I am getting the
most bizarre error, it will randomly delete characters out of the HTML
code while in transit to the address, therefore generating errors in
the final output.

For instance, a "</td>" tag will become "/td>" or a URL will end in
".co.k", missing the "u". This seems to happen totally randomly from
one try to the next throughout the code.

Has anyone had or seen this problem before?

The PHP code I use is straight forward, so no errors there.
I am using a lot of absolute URL paths to images and spacer gifs in
the email (about 20-30), is there a limit to what an email can handle?

I would appreciate any insight anyone has.

Cheers
Paul
Jul 17 '05 #1
5 2247
Paul Lamonby wrote:
I am generating a HTML formatted email in PHP,
Why?
but I am getting the most bizarre error, it will randomly delete
characters out of the HTML code while in transit to the address,
[ ... ]
is there a limit to what an email can handle?


Text lines may not exceed 1 000 characters.

--
Jock
Jul 17 '05 #2
Paul Lamonby wrote:

I am generating a HTML formatted email in PHP


That's your problem right there. Email is text, not HTML.

bblackmoor
2004-06-14
Jul 17 '05 #3
Thanks for the constructive comments, very helpful!
I too am not a fan of HTML formatted emails, but why create MIME types
in email and not use them? If a client requires HTML formatted emails
then thats what I will supply. ( I assume thats your direction of
comment. )

Paul

Brandon Blackmoor <bb********@spa mcop.net> wrote in message news:<2j******* *****@uni-berlin.de>...
Paul Lamonby wrote:

I am generating a HTML formatted email in PHP


That's your problem right there. Email is text, not HTML.

bblackmoor
2004-06-14

Jul 17 '05 #4
Paul Lamonby wrote upside-down:
I too am not a fan of HTML formatted emails, but why create MIME types
in email and not use them?
I make use of MIME and have nothing to do with so-called HTML email.
If a client requires HTML formatted emails then thats what I will supply.


Yeah,

The son-of-a-bitch,
Is probably rich,
So smile with all your might.

(Noel Coward)

--
Jock
Jul 17 '05 #5
Hello,

On 06/15/2004 09:22 AM, Paul Lamonby wrote:
Thanks for the constructive comments, very helpful!
I too am not a fan of HTML formatted emails, but why create MIME types
in email and not use them? If a client requires HTML formatted emails
then thats what I will supply. ( I assume thats your direction of
comment. )


I think most people ignore that you can send a message with plain text
and HTML versions in the same body message using MIME
multipart/alternative type. If you send your HTML messages like this,
there is no problem because you can still make your message readable
with e-mail clients that do not support text, even if the plain text
part says that this is an HTML message.

This is not a trivial task but if you want to send messages this way,
you may want to try this class to that makes it very simple:

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

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
Jul 17 '05 #6

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

Similar topics

3
4720
by: Niel | last post by:
Hello friends, Don't know if i am posting to the right group, but if anyone has an idea about this please let me know. I just wanted to ask that is it true that it is not possible to send HTML Formatted emails from ASP through CDO. (CDOSYS). I mean I am able to send the email which is HTML formatted through CDONTS that sends email through Virtual SMTP server and i get a proper looking email. But when i tried same in CDO then all i got...
5
2633
by: BaWork | last post by:
I have a web form where a client can select which site members to send an email to. This form is populated from the contents of the member table, so the form can have 0-x names listed on it depending on member expiration dates. When the form is submitted, the code loops through the form contents and sends an email to those members that meet the selected criteria. All this worked perfectly when I was sending text emails, but since I
4
3427
by: frogman042 | last post by:
My daughter is playing around trying to learn JavaScript and she wrote a small program that prints out a message in increasing and decreasing font size and color changes. She is using document write and it works fine until she puts it into a function and then calls the function from a button with onClick. This also seems to work OK, with the exception that the page is cleared, and the curser changes (and stays) as an hourglass. In...
2
1747
by: Paul Turley | last post by:
Does anyone have some sample code for sending an HTML formatted message using CDONTS? Thanks RE: Sending HTML formatted mail using CDONTS -- Paul Turley, MCSD, MCAD, MCT, MSF Practitioner, A+ Technician
4
3769
by: Alex Nitulescu | last post by:
Hi. Is there any way to really disable that stupid HTML auto-formatting in VS.NET ? I have a page with a lot of complicated HTML (many complex tables etc) and JScripts. If it's not formatted properly, I can get lost in a second. So I spent probably half an hour to format my HTML to suit my tastes. I took care to un-check both check-boxes under "Apply Automatic Formatting" - Options/HTML-XML/Format ("When saving document" and "When...
6
3085
by: Sakcee | last post by:
html = '<html><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" <head></head> <body bgcolor=#ffffff>\r\n Foo foo , blah blah </body></html>' >>> import htmllib >>> import formatter >>> parser=htmllib.HTMLParser(formatter.NullFormatter()) >>> parser.feed(html)
21
2730
by: maya | last post by:
hi, I'm designing an HTML email for a client.. I know general guidelines (no CSS, no JavaScript... although I do use limited CSS, inside tags (as in <span style=".."we do this at work and it works fine, so I figured it's ok..) but I have a few more questions, for example, is it ok to do client-side image-maps? is there a web page somewhere with general guidelines for HTML e-mails? (and what is best way to test HTML e-mails? (I...
1
2943
by: robbiesmith79 | last post by:
Just so this is out there on the web, I battled the past 24 hours about this. Background info... I developed a ecommerce website in PHP 4 on a shared linux hosting plan from GoDaddy and had the html formatted emails sending as text/html and were going fine with limited header information. Then we moved the site over to a Dedicated Linux hosting plan. This time, it's PHP 5. Things are bound to not work as expected moving to a new...
4
5063
by: cybervigilante | last post by:
I sent HTML formatted email, using PHP, to my Yahoo address from my server, and it came out fine, styles and all. I sent it to my gmail address to test it and all I see is the raw html code. But I do get formatted email in gmail, so I know people make it work somehow. I'm looking right at a gmail message that I copied to Dreamweaver and it's using Strong and Red text attributes that work in gmail. But mine don't. What do you do...
0
8633
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
9199
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...
0
9055
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8902
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
7787
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...
1
6552
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
5891
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();...
2
2366
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2016
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.