|
-
Mar 15th, 2001, 12:13 AM
#1
Thread Starter
Member
I'm using VB to generate emails in the outbox of outlook 2000. My code is like this:
Code:
set objOutlookMsg = objOutlook.CreateItem(olMailItem)
With objOutlookMsg
.To = rs!email
.Subject = mySubject
.HTMLbody = "..................... "
.Send
End With
set objOutlookMsg = Nothing
Like this I can only send emails in HTML format. If the user is using a text-only email client, he can't read the email correctly. What should do to make the email in HTML and TXT format where appropriate? Thanks a lot!!
Please Visit My WebCam!!
http://www.hmcheung.com
-
Mar 15th, 2001, 09:16 AM
#2
Hyperactive Member
okay...
Use .body for text messages. I have an app that uses outlook too, but my emails are in text and I use .body instead of .HTMLbody
I hope this helps.
-vbuser1976 
VB6 Enterprise SP6
SQL 7.0 SP2
VBScript, HTML, Javascript, C++, a little UNIX
-
Mar 15th, 2001, 09:23 AM
#3
Thread Starter
Member
.body
Thanks very much. I tried to use .body but the outcome is that the email body contains HTML tags. I'd like that when an HTML-enabled email client read the mail, it'll present the HTML version, otherwise, it'll display the plain txt version.
I think there will be something to do with the MIME type. Any ideas?
Please Visit My WebCam!!
http://www.hmcheung.com
-
Mar 15th, 2001, 09:32 AM
#4
Hyperactive Member
yeah,...
What you are going to have to do is try to set up an if statement that checks the users preferences. But you will have to write out the body twice. One for .htmlbody and .body. Or maybe you can ask the user beforehand what type of email format they want and then create two separate subs, one for html and one for text. I don't know of any other ways to do this. Hopefully, someone else on this forum might have a different idea.
Sorry I couldn't help you more. Good Luck.
-vbuser1976 
VB6 Enterprise SP6
SQL 7.0 SP2
VBScript, HTML, Javascript, C++, a little UNIX
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
|