473,748 Members | 2,496 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

email text with utlok express. format problem

Hi,
I'vea function that create an email using the default mail program, to
format the text I use the function "ReplaceSpecial Characters" found in the
link http://www.vb-helper.com/howto_launch_email.html

This works with Outlook, but if the default mail program is outlook express
this function doesn't work. It create the email text as one paragraphe.
here is the function:

Private Function ReplaceSpecialC haracters(ByVal txt As _
String) As String
Dim i As Integer
Dim ch As String
Dim result As String

For i = 1 To Len(txt)
ch = Mid$(txt, i, 1)
If (ch < " ") Or (ch > "~") Or (ch = "&") Then
' Replace with hex code.
ch = Right$("00" & Hex(Asc(ch)), 2)
result = result & "%" & ch
Else
' Leave unchanged.
result = result & ch
End If
Next i

ReplaceSpecialC haracters = result
End Function

Any help please?

Nov 20 '05 #1
1 1447
* "touf" <to******@hotma il.com> scripsit:
I'vea function that create an email using the default mail program, to
format the text I use the function "ReplaceSpecial Characters" found in the
link http://www.vb-helper.com/howto_launch_email.html

This works with Outlook, but if the default mail program is outlook express
this function doesn't work. It create the email text as one paragraphe.
here is the function:


Have a look at 'HttpUtility.Ur lEncode'.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2

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

Similar topics

5
14234
by: lucanos | last post by:
Hey All, I'm having trouble trying to create a PHP file which will generate a multipart email message (containing both an HTML formatted part and a Plain Text formatted part). I have Googled for it, and found previous entries in Google Groups, but I just can't get it to work. My PHP File contains the following:
9
4948
by: Phil W | last post by:
I'm using CDONTS and am trying to send an email out which displays in HTML for HTML-enabled clients, and plain text for non-HTML clients. Unfortunately I am using IIS4 so CDOSYS is not available (so I can't use the handy .Textbody or .HTMLBody properties). How would I go about it with CDONTS? Thanks, Phil
88
12538
by: Mike | last post by:
Is there a way to determine what a user's default email client is? I read a post from 3 years ago that said no. I guess I'm hoping something has come along since then.
0
2400
by: MikeM | last post by:
The email address stays through each loop and keeps adding the next email address. joe@email.com then the next run would be joe@email.com; mike@email.com etc... The subject and the attached file work fine code follows, test sub is at the end: Option Compare Database Option Explicit
2
1844
by: strout | last post by:
It's a pain to create each button with 2 images: button_on.gif button_off.gif I am looking for a control that have on/off two states, preferred as BACKGROUND images and with button text on it. Any hint?
4
5053
by: | last post by:
I have a "form field highlight" javascript that I've added to some of my ASP.NET forms using the following syntax: body.Attributes.Add("onClick", "highlight(event);"); body.Attributes.Add("onKeyUp", "highlight(event);"); Some of my forms have a great many text box controls that I want to highlight.. I would much rather that ASP.NET do the work of looping through all text boxes and applying these two attributes.
10
19579
by: Jed | last post by:
I have a form that needs to handle international characters withing the UTF-8 character set. I have tried all the recommended strategies for getting utf-8 characters from form input to email message and I cannot get it to work. I need to stay with classic asp for this. Here are some things I tried: 'CDONTS Call msg.SetLocaleIDs(65001)
5
7211
by: xin.yadong | last post by:
Is there a way to create an New Outlook Email from an ASP.NET application? I can not use "mailto:", since it is only support a string less than 512. I have find a good way from link : http://zones.advisor.com/doc/17330 , that thread show how to create a new appointment instead of email. but I have no idea about the format of a new email. Does any one know the format of a new outlook email i.e. Response.ContentType = "text/XXXXXX"...
4
4941
by: Jens | last post by:
Hello, We have several cases where an email, send with the CDO.Message object in ASP, is received malformed at the receiver's e-mail address. code in it. When the message is received at the client's email address there are some characters or text mallformed, each time at another position in the e-mail. I know for sure that the html code is valid so that's not the problem.
0
8831
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
9555
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
9376
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
9250
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
8247
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
6796
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
6076
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
4607
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...
1
3315
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

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.