|
-
Jul 14th, 2006, 09:53 AM
#1
Thread Starter
Fanatic Member
Formating Email Message
I am sending an email message via the Shell Command. However I want to make some of the text bold or underlined with other parts regular text.
I have tried the following but it doesn't seem to be working
VB Code:
Dim strMessage As String
strMessage = "[b]THIS IS BOLD[/b]" & vbCrLf
strMessage = strMessage & "[u]THIS IS UNDERLINED[/u]" & vbCrL
strMessage = strMessage & "This is normal" & vbCrL
blnSuccess = Email(&H0, strTo, "TESTING", strMessage)
However when I try to this technique I just get all the text out instead of the Bold or Underlined works. I have the emailer set to HTML.
Any ideas if this is possible. Thanks
-
Jul 14th, 2006, 09:58 AM
#2
Fanatic Member
Re: Formating Email Message
Try surround the bold text with <b>
-
Jul 14th, 2006, 10:01 AM
#3
Thread Starter
Fanatic Member
Re: Formating Email Message
I have tried both [] and <> however when the email message is opened it just has "<b>THIS IS BOLD</b> or THIS IS BOLD" and same for underlining.
-
Jul 14th, 2006, 10:22 AM
#4
Fanatic Member
Re: Formating Email Message
I seem to remember that you need to add a header to specify that the email is in HTML, and then use <b>bold text here</b>.
Search google for sending HTML emails and you should find something
-
Jul 14th, 2006, 10:25 AM
#5
Fanatic Member
Re: Formating Email Message
I did some investigating and it should work if you add this to the top of your email
Code:
Content-Type: text/html; charset=ISO-8859-1
and then use <b>This is bold text</b>
[Edited by MartinLiss]
Last edited by MartinLiss; Jul 14th, 2006 at 11:45 AM.
-
Jul 14th, 2006, 10:35 AM
#6
Re: Formating Email Message
How the email appears to the receiver depends on the client the email is being viewed in. A POP3 client (a bare client, not one calling Word to view files) will see [b]text[/b] as [b]text[/b], not as text - since email is specified as a text medium - characters only. In order to have text appear bold to the receiver, you have to know whether the receiver can read html email (which is an oxymoron).
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Jul 14th, 2006, 10:39 AM
#7
Fanatic Member
Re: Formating Email Message
[b] is BBCode which is why it won't work in an email, it only works in certain forums.
<b> is HTML, which is supported by just about all clients, so if you include the header that I gave you above it will work fine
-
Jul 14th, 2006, 11:23 AM
#8
Thread Starter
Fanatic Member
Re: Formating Email Message
I will give a try in a few minutes when I have a chance an let you know.
-
Jul 14th, 2006, 01:04 PM
#9
Fanatic Member
Re: Formating Email Message
-
Jul 14th, 2006, 01:43 PM
#10
Re: Formating Email Message
 Originally Posted by shirazamod
[b] is BBCode which is why it won't work in an email, it only works in certain forums.
<b> is HTML, which is supported by just about all clients
All clients that default to reading html, which is fewer and fewer as the exploits increase. One of these days people are going to start realizing that Microsoft's errors don't redefine internet RFCs.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|