Author |
|
kungchiwei Newbie
![Newbie](forum_images/1_star_rating.gif)
Joined: 06 November 2006
Online Status: Offline Posts: 2
|
Posted: 06 November 2006 at 10:08pm | IP Logged
|
|
|
while write mail,
which mothod can create draft mail??
|
Back to Top |
|
|
Andrew AfterLogic Support
![AfterLogic Support](forum_images/5_star_rating.gif)
Joined: 28 April 2006 Location: United States
Online Status: Offline Posts: 1189
|
Posted: 07 November 2006 at 3:59am | IP Logged
|
|
|
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 |
|
|
kungchiwei Newbie
![Newbie](forum_images/1_star_rating.gif)
Joined: 06 November 2006
Online Status: Offline Posts: 2
|
Posted: 07 November 2006 at 10:24pm | IP Logged
|
|
|
Thank's
|
Back to Top |
|
|