473,666 Members | 2,165 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

sending mail in html AND text format ?

HI,

I want to be sure that users receive and can read my mails.

How can I send mail in HTML AND text Format in one send ?

thx
Jul 21 '05 #1
3 1425
You cannot do this in a single send. If you want to do this then you will have to send out two seperate emails - one in plain text format and one in HTML format

Gary
Jul 21 '05 #2
DJM
Easiest way to do this:

Start your message with <!--
Then display the message in plain text.
Close with -->
And begin your HTML version.

You may want to include a line of text at the end of the plain text
indicating that what follows is HTML.

The HTML comment tags will prevent it from being displayed by HTML-enabled
mail readers.

However, your non-HTML-enabled readers will display the message twice, once
as plain text in the HTML comment tags, and then the raw HTML code attached.
This annoys many such users. It would be preferable to allow the user to
store a preference for receiving HTML or plain text and only send that
version.

<td*******@neta rchitects-europe.com> wrote in message
news:40******** *************** ***@posting.goo gle.com...
HI,

I want to be sure that users receive and can read my mails.

How can I send mail in HTML AND text Format in one send ?

thx

Jul 21 '05 #3
The correct way to do this is to send a Multipart MIME message. Place the
HTML version in one part, and the text version in another. Nearly every
e-mail reader can understand multipart MIME, and will only show the part
that the user is interested in.

--- Nick

"DJM" <dj*@spam.bai t> wrote in message
news:%2******** *******@tk2msft ngp13.phx.gbl.. .
Easiest way to do this:

Start your message with <!--
Then display the message in plain text.
Close with -->
And begin your HTML version.

You may want to include a line of text at the end of the plain text
indicating that what follows is HTML.

The HTML comment tags will prevent it from being displayed by HTML-enabled
mail readers.

However, your non-HTML-enabled readers will display the message twice, once as plain text in the HTML comment tags, and then the raw HTML code attached. This annoys many such users. It would be preferable to allow the user to
store a preference for receiving HTML or plain text and only send that
version.

<td*******@neta rchitects-europe.com> wrote in message
news:40******** *************** ***@posting.goo gle.com...
HI,

I want to be sure that users receive and can read my mails.

How can I send mail in HTML AND text Format in one send ?

thx


Jul 21 '05 #4

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

Similar topics

1
1735
by: prasanna | last post by:
Hello I tried to send mail from PHP in html format. But an ! mark appears in mail body in Inbox. I tried to print body text on page before sending mail and it does not show ! mark. I replaced ! mark from mail body before passing it to mail() function but then also it adds ! mark in mail body. Can you please tell me why this is happening? Thanks
4
2965
by: Francois Keyeux | last post by:
hello everyone: i have a web site built using vbasic active server scripting running on iis (it works on either iis 50 and 60, but is designed for iis 50) i know how to create a plain text email by creating a text file, with content following certain format, and saving that file into the correct '..\mailroot\pickup' folder, and it is working fine
0
2186
by: David Dvali | last post by:
Hello. I have a problem with sending Unicode text in mail message. So what I do: First of all I have some template file like this: ================================= <html> <head><title>Test Message</title></head> <body> <p>Hello {0}</p>
3
226
by: tdeclercq | last post by:
HI, I want to be sure that users receive and can read my mails. How can I send mail in HTML AND text Format in one send ? thx
6
2740
by: Anuradha | last post by:
Dear All How can i send mails using vb.net Thanx all
2
2672
by: ChrisA | last post by:
I'm sending email from my ASP.NET 1.1 app, and it works fine providing the BodyFormat of the System.Web.Mail.MailMessage is set to Text. If I change to Html format, it breaks. Here's the code: Me.Msg = New System.Web.Mail.MailMessage With Me.Msg .To = "someToAddress"
7
4383
by: Ray Booysen | last post by:
Hi all I'm sending email via ASP.NET in HTML mode. Each email has exactly one attachment and I do have full access to the SMTP server. However, if I send the email in HTML format, the framework reports the following exception: "System.Web.HttpException: Could not access 'CDO.Message' object. ---> System.Reflection.TargetInvocationException: Exception has been thrown
1
3492
by: krishan123456 | last post by:
i have tried to send email with attached doc file but when i receive the mail i find the attached file in encoded text instead of actuall attachment.the code that i used to send an email is given below. function SendMail123($From,$FromName,$To,$ToName,$Subject,$Text,$Html,$AttmFiles){ $OB="----=_OuterBoundary_000"; $IB="----=_InnerBoundery_001"; $Html=$Html?$Html:preg_replace("/\n/","{br}",$Text) or die("neither text nor...
4
2838
by: Sonnich Jensen | last post by:
Hi all! I use the following for sending mail from ASP, but there is a problem - it goes to a intranet thing (eRoom) which does not read it, while Outlook etc does not have any problems. eRoom does simply not read anything but the from and subject. The body is missing...
0
8454
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, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8362
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
8878
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
8560
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
8644
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
7389
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
5671
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
4200
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...
2
2012
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.