Search The ForumSearch   RegisterRegister  LoginLogin

MailBee IMAP4

 AfterLogic Forum : MailBee IMAP4
Subject Topic: How to design draft mail? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
kungchiwei
Newbie
Newbie


Joined: 06 November 2006
Online Status: Offline
Posts: 2
Posted: 06 November 2006 at 10:08pm | IP Logged Quote kungchiwei

while write mail,
which mothod can create draft mail??
Back to Top View kungchiwei's Profile Search for other posts by kungchiwei
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 07 November 2006 at 3:59am | IP Logged Quote Andrew

You should just upload the message with "Draft" flag into the "Drafts" folder of the IMAP account. The following sample shows how to do this:

Code:
Dim Mailer, Msg
Set Mailer = CreateObject("MailBee.IMAP4")
Set Msg = CreateObject("MailBee.Message")

Mailer.EnableLogging = True ' Logging helps to discover any problems
Mailer.LogFilePath = "C:\imap4_log.txt"

Mailer.LicenseKey = "put your license key here"


Msg.ToAddr = "bill@yoursite.com, joe (Skywalker) <jj@host.com>"
Msg.FromAddr = "joe@mysite.com"
Msg.Subject = "Hello"
Msg.BodyText = "Test message"


If Mailer.Connect("mailserver.com", 143, "MyName", "MyPassword") Then

  ' Upload message from mail.eml file keeping defaults for datetime and flags
  If Mailer.AppendMessage("Drafts", Msg.RawBody, , 4, 0) Then ' The 4th parameter is "Draft" flag
    MsgBox "Message uploaded successfully"
  End If

  Mailer.Disconnect
Else
  MsgBox Mailer.ErrDesc
End If


You can learn more from MailBee Objects documentation / Reference / IMAP4 Object / Methods / AppendMessage.


Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 
kungchiwei
Newbie
Newbie


Joined: 06 November 2006
Online Status: Offline
Posts: 2
Posted: 07 November 2006 at 10:24pm | IP Logged Quote kungchiwei

Thank's
Back to Top View kungchiwei's Profile Search for other posts by kungchiwei
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide