| Author |  | 
      
        | OptionExplicit Newbie
 
  
 
 Joined: 06 December 2007
 Online Status: Offline
 Posts: 8
 | 
          Hello out there,
           | Posted: 09 April 2008 at 2:00am | IP Logged |   |  
           | 
 |  
 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 |     | 
       
       
        |  | 
        | Andrew AfterLogic Support
 
  
 
 Joined: 28 April 2006
 Location: United States
 Online Status: Offline
 Posts: 1189
 | 
          MailBee Objects (ActiveX) supports setting the following flags only:
           | Posted: 09 April 2008 at 5:22am | IP Logged |   |  
           | 
 |  
 - 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 |     | 
       
       
        |  | 
        | OptionExplicit Newbie
 
  
 
 Joined: 06 December 2007
 Online Status: Offline
 Posts: 8
 | 
          "Setting keywords is not supported."
           | Posted: 09 April 2008 at 9:51am | IP Logged |   |  
           | 
 |  
 That's a pity :-(
 No chance this feature will be implemented in the near future? ;-)
 
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Alex AfterLogic Support
 
  
  
 Joined: 19 November 2003
 Online Status: Offline
 Posts: 2207
 | 
          We primarily focus on .NET development. For ActiveX version, we release maintenance updates (i.e. bugfixes) only.
           | Posted: 09 April 2008 at 10:06am | IP Logged |   |  
           | 
 |  
 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 |     | 
       
       
        |  | 
        | OptionExplicit Newbie
 
  
 
 Joined: 06 December 2007
 Online Status: Offline
 Posts: 8
 | 
          Thank you very much for showing the workaround using IMAP4.SendCommand.
           | Posted: 09 April 2008 at 3:03pm | IP Logged |   |  
           | 
 |  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 |     | 
       
       
        |  | 
        | Alex AfterLogic Support
 
  
  
 Joined: 19 November 2003
 Online Status: Offline
 Posts: 2207
 | 
          If your server supports UIDPLUS extension, you can take advantage of it:
           | Posted: 10 April 2008 at 6:17am | IP Logged |   |  
           | 
 |  
 
| 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 |     | 
       
       
        |  | 
        | OptionExplicit Newbie
 
  
 
 Joined: 06 December 2007
 Online Status: Offline
 Posts: 8
 | 
          thank you very much for your support: Fast and very helpful as always!!
           | Posted: 11 April 2008 at 5:20am | IP Logged |   |  
           | 
 |  
 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 |     | 
       
       
        |  |