cancel
Showing results for 
Search instead for 
Did you mean: 

MAPIEx VBO - Mail Classification

Ashis_KumarRay
Level 4
Currently our BP Process uses Blue Prism MAPIEx object to send email to outside of the company. But now our client wants to classify the mail I.e. Internal, Public, Confidential etc. before sending any Email to outside of company through BP process. Could anyone please let me know how to achieve this one by using any VBO or anything else? Note: Currently when we send any email through Outlook manually it asks for classification thus Client demands for the same way should BP use. Thanks
23 REPLIES 23

AmiBarrett
Level 12
One of the (many) problems with MAPIEx is that it leverages a custom (unstable) dll that they wrote to perform everything. You'll be much better off migrating to the Outlook VBO, found either on the Digital Exchange or as part of a BP6 install. This VBO doesn't rely on the custom dll file and will let you interact with the Outlook VBA code directly.   Assuming you have access to the Outlook VBO, you can modify it by adding the following line mail.ItemProperties.Add(""MyCompanyClassification"", olText) = ""INTERNAL"" ""INTERNAL"" can be replaced with a variable to hold whatever classification it's supposed to have.     You can try your chances with this on MAPIEx, but I would be surprised if it's that cooperative.

AmiBarrett
Level 12
As a side note, if ""MyCompanyClassification"" is incorrect, you can probably loop through each item in mail.ItemProperties on Get Mail, and figure out what it's supposed to be.

Ashis_KumarRay
Level 4
Thanks Ami. I have downloaded Outlook VBO and it is working fine. But still the classification portion not working as I think ""MyCompanyClassification"" is not used by our company classifier i.e. Boldon James. Could you please let me know syntax to get ItemProperties on Get mail?  

AmiBarrett
Level 12
Writing this at 12:40AM without testing, but I think this'll work. You'll just have to set CSV as an output to a text data item. dim CSV = """" for i = 0 to mail.ItemProperties.Count - 1      CSV += mail.ItemProperties.Item(i) +"" | "" next

Ashis_KumarRay
Level 4
Thanks Ami.  I tried the above code found the property I.e. ""Classification"" we used as a property. But when I am using the above code (Outmail.ItemProperties.Add(""Classification"", olText) = ""INTERNAL) is not working. Also I used the code like below that also not working. Anyway Outlook VBO is able to send an email without classifying and I am not getting any error. OutMail.ItemProperties.Add(""Classification"",1)  OutMail.ItemProperties.item(""Classification"").Value = ""Internal"" Do you think I don't have access to modify the Outlook property or anything else, could you please help me? Regards, Ashis  

AmiBarrett
Level 12
It's possible that the label is something other than ""INTERNAL"", much like how ""MyCompanyClassification"" turned out to be ""Classification"". If you have an e-mail in the inbox already marked as internal, you should be able to get the value by leaving off the = ""Internal"" part and assigning the result to an output variable. For example  value = OutMail.ItemProperties.item(""Classification"").Value

Ashis_KumarRay
Level 4
I understood your point but the issue is not with Get the Item property value. I have an email which is classified as ""Confidential"" and I am able to Get that email with properties value. from this email I came to know that the property used by the claissification is ""ClassificationConfidential"". But the issue is to Set or Add the property of Classification before sending an email. In Send email action of Outlook VBO, I am trying to add classification as Internal or Confidential or Public etc which is not happening and I am not getting any error message.

AmiBarrett
Level 12
The code you pasted earlier shows trying to set it as ""Internal"". However, it looks like that should instead be ""Confidential"" . If .Value is returning ""ClassificationConfidential"", I would try putting that whole string in there instead. In theory, anything .Value returns can be assumed vald, because it's already set. Setting it to the same value you were returned should work.

Ashis_KumarRay
Level 4
Sorry to say, I am little bit confused now. I modified the ""GetMail"" action of Outlook VBO to check what is the Item property used by Boldon James to classify an email. To fulfil that I manually send an email to myself. Also I classified that email to Confidential manually. Then I tried to read that same email by Getmail action of Outlook VBO where I have used the below code to get the all item properties of an mail. The delimiter I set as """" thus it came as ""ClassificationConfidential"". dim CSV = """" for i = 0 to mail.ItemProperties.Count - 1      CSV += mail.ItemProperties.Item(i) +"" | "" next Then I came to know that the property used by my company is ""Classification"". Thus now my next step is to send an email by classifying from Blue Prism. Thus I use the action ""Send Mail"" of Outlook VBO where I have modified this ""Send Mail"" action and added the below code. BP is able to send an email but not able to classify. That's why I doubted whether I don't have access to overwrite any property of Outlook or I am missing something in VBO code. OutMail.ItemProperties.Add(""Classification"",1)  OutMail.ItemProperties.item(""Classification"").Value = ""Confidential"" Please let me know if I am not able to explain anywhere.