Author |
|
Jan Guest Group
Joined: 10 November 2003
Online Status: Online Posts: 262
|
Posted: 10 February 2006 at 1:22pm | IP Logged
|
|
|
Hi,
is there a sample how to get an HTML- or RTF-Mail and how i can get that HTML-Body in a string?
Regards
Jan
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 11 February 2006 at 5:52am | IP Logged
|
|
|
You can use example which is supplied with Message.BodyText property topic in MailBee documentation.
For your convenience, I duplicated it below:
Code:
Dim Mailer, Msg
'Using visual basic to create object
Set Mailer = CreateObject("MailBee.POP3")
'Using ASP to create object
'Set Mailer = Server.CreateObject("MailBee.POP3")
'In ASP use Response.Write instead of MsgBox
Mailer.LicenseKey = "put your license key here"
Mailer.Connect "mailserver.com", 110, "MyName", "MyPassword"
If Mailer.Connected Then
If Mailer.MessageCount > 0 Then
Set Msg = Mailer.RetrieveSingleMessage(1)
If Not Msg Is Nothing Then MsgBox "Body = " & Msg.BodyText
End If
Mailer.Disconnect
End If
|
|
|
To find out which format BodyText is, you can examine Message.BodyFormat property:
0 - BodyText is plain-text
1 - BodyText is HTML
2 - BodyText is RTF
Regards,
Alex
|
Back to Top |
|
|