Search The ForumSearch   RegisterRegister  LoginLogin

MailBee IMAP4

 AfterLogic Forum : MailBee IMAP4
Subject Topic: Set non standard IMAP Keyword $Forwarded Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
OptionExplicit
Newbie
Newbie


Joined: 06 December 2007
Online Status: Offline
Posts: 8
Posted: 09 April 2008 at 2:00am | IP Logged Quote OptionExplicit

Hello out there,

my program uses MailBee's 5.5.0.123 AppendMessage method to create e-mails on a Dovecot-IMAP-Server.
Is it possible to set the keyword $Forwarded when appending the messages?

$Forwarded is a non standard keyword as described in
http://tools.ietf.org/html/draft-melnikov-imap-keywords-03

Any help would be appreciated!
Regards from Berlin!
Back to Top View OptionExplicit's Profile Search for other posts by OptionExplicit
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 09 April 2008 at 5:22am | IP Logged Quote Andrew

MailBee Objects (ActiveX) supports setting the following flags only:

- Answered
- Deleted
- Draft
- Flagged
- Recent
- Seen

Setting keywords is not supported. However, MailBee.NET Objects supports this. Imap.Search and Imap.SetMessageFlags methods accept "string flags", so you can pass a keyword there.

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


Joined: 06 December 2007
Online Status: Offline
Posts: 8
Posted: 09 April 2008 at 9:51am | IP Logged Quote OptionExplicit

"Setting keywords is not supported."

That's a pity :-(
No chance this feature will be implemented in the near future? ;-)
Back to Top View OptionExplicit's Profile Search for other posts by OptionExplicit
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 09 April 2008 at 10:06am | IP Logged Quote Alex

We primarily focus on .NET development. For ActiveX version, we release maintenance updates (i.e. bugfixes) only.

You can, however, easily workaround this using IMAP4.SendCommand method:
Code:
IMAP4.SendCommand "STORE 1 +FLAGS.SILENT(\Seen $Forwarded)"


This code sets \Seen and $Forwarded keywords for the first message in the folder.

If you'we working with UIDs rather than with message numbers, just prepend the command with "UID" word:
Code:
IMAP4.SendCommand "UID STORE 9986 +FLAGS.SILENT(\Seen $Forwarded)"


Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
OptionExplicit
Newbie
Newbie


Joined: 06 December 2007
Online Status: Offline
Posts: 8
Posted: 09 April 2008 at 3:03pm | IP Logged Quote OptionExplicit

Thank you very much for showing the workaround using IMAP4.SendCommand.
I will try this soon!

Is there a reliable way to get a reference (index, UID) to a message created via AppendMessage method? Because I use AppendMessage and then want to set the $Forwarded flag for this message.

Thanks again for your help!
Regards from Berlin!
Back to Top View OptionExplicit's Profile Search for other posts by OptionExplicit
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 10 April 2008 at 6:17am | IP Logged Quote Alex

If your server supports UIDPLUS extension, you can take advantage of it:
Code:

If Mailer.AppendMessage("Inbox", "C:\msg.eml") Then
  intBegin = InStr(Mailer.ServerResponse, "[")
  intEnd = InStr(Mailer.ServerResponse, "]")
  strRespCode = Mid(Mailer.ServerResponse, intBegin + 1, intEnd - intBegin - 1)
  arr = Split(strRespCode, " ")
  strUID = arr(2)
End If

strUID will contain UID value.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
OptionExplicit
Newbie
Newbie


Joined: 06 December 2007
Online Status: Offline
Posts: 8
Posted: 11 April 2008 at 5:20am | IP Logged Quote OptionExplicit

thank you very much for your support: Fast and very helpful as always!!

Your workaround for non-standard keywords using .SendCommand "STORE 1 +FLAGS.SILENT ($Forwarded)"
works really fine!

Getting the UID of a newly appended message also works fine on a test server. Unfortunately our main IMAP server does not support UIDPLUS. So I'll probably try to do a search for the Message-ID to get the UID back after AppendMessage has created the new message from a message source string. ...

Thanks again for your help!
Regards from Berlin!
Back to Top View OptionExplicit's Profile Search for other posts by OptionExplicit
 

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