EWS - Download attachment from nested emails/embedded emails - vb.net

We are trying to download attachments of embedded email within an email. Unfortunately embedded email is of type message/RFC822 and does not have any information available even if ItemAttachment is loaded into memory using ItemAttachment.Load().
When we then try to load EmailMessage using ItemAttachment.Item.Load() we get an exception saying "This operations isn't supported on attachments".
Could anyway please help? Spent two days researching how to get it done and after many tries, still without success.

Related

Search keyword in PDF and check if exists

The idea was to be able to, as soon as a receive a mail with a PDF attached, find a way in which the PDF can be downloaded and be searched for a specific keyword (for instance, see if my name is in it) and if my name is on any of the pages of the PDF, then send another mail notifying the user that there’s a pdf in which he has been named.
This is in order to avoid having to check dozens of mails daily and PDFs just to see if your name is in it or not.
I managed to do this using Zapier but I relied on PDFco’s API for the search, and it is payware, so I’m taking a different approach.
My question is more based on what library would make that search inside the PDF and would provide a Boolean value that said if the keyword exists or not.
Thank you!

Hangouts/Chat - messagesUnread always 0 despite new messages

I'm trying to write a Hangouts/Chat dockapp to show unread message notifications, I'm using the following scope url:
https://www.googleapis.com/gmail/v1/users/me/labels/CHAT?access_token=<my_access_token>
The json returns fine, however messagesUnread is always 0. I've disconnected every possible app/browser etc that could be grabbing the messages before I reloaded the above URL, sent a new chat message from another account and messagesTotal increments by 1 but still the unread stays at 0. Even if I disable hangouts in the gmail web interface settings, send a message and search by "label:chat" the chat message that was received arrives marked as read in the web interface. If I manually mark a chat message as unread then the values in the above url do change correctly.
I can obviously work around this by storing he previous messagesTotal on comparing to current, however that creates a requirement to click the app to acknowledge the unreads which is a tad annoying.
Has anyone found a way to get a true unread count from chats/hangouts?
Thanks,
Haydn.
If you use the method users.labels.get for any other label (e.g. INBOX), it will return messagesUnread correctly.
Unfortunately for the label CHAT this is not the case
Chat messages are not quite the same as emails
It is not clear either it is intended behavior that you cannot retrieve the unread chat messages or a bug
This issue has been already filed on Google's Public Issue Tracker, but it has been closed by Google because it has been reported in Spanish.
Feel free to report the issue in English to hopefully obtain a response from Google eihter the bheavior is intended or a bug.

How do I find attachments in ravendb 3.5?

I'm currently debugging some code which is supposed to return an attachment for a given document, but no attachment is coming back. Raven studio indicates that there are attachments in the database - it shows me that a number of attachments exist - but I can't see, via the studio web UI, if a particular document has an attachment.
Is there a way to query attachments via the studio UI? Also is there a way to tell if a document has an attachment via the studio UI? Online documentation don't seem to be clear on this. Alternatively is there a way to query ravendb using the http API for attachments?
I've tried the url suggested in RavenDB attachments but it returned an empty array as a response
GET databases/{databaseName}/static/ will give you the list of attachments in the db.

SharePoint Workflow Only Works For Me?

Ok, I have a workflow built in SharePoint 2010, built in SharePoint Designer. It is set up to begin whenever a new item is created. The library is also set up to create new items based on email attachments. So the goal is for users to email the attachments to the library and the workflow takes over.
The workflow only works for me. The other people attempting to use it are listed as Full Control in the permissions. They are using the correct email address, and the library is creating the new items based on the attachments. The problem is that the workflow keeps saying error occurred.
The error says something about some columns needing different types of data, but when I email to the library it goes off without a hitch.
I am completely stumped as to what could be different about them sending the email instead of me.
Sorry I got kind of long winded, and thanks in advance for any help.
The system account is not allowed to initiate workflow on its own. There is a powershell that you need to run to enable system account to run workflow. Also try impersonation in workflow.
Here found it.
stsadm.exe –o setproperty –propertyname declarativeworkflowautostartonemailenabled –propertyvalue yes
Not sure what was wrong with it, but I just deleted it then rebuilt it and now it works. Don't think I did anything different so I'm not sure.

"Unsafe attachments" prompt in Outlook on outgoing mail

Plenty of info on incoming unsafe attachments but I've yet to find one that addresses my query on outgoing Outlook items.
I'm running a script that's sending large volumes of emails over Outlook and ideally i'd like to let it chug away all weekend: however last time I tried it got stuck when Outlook gave a prompt asking if I was sure I wanted to send the message since it might contain attachments that were unsafe.
It's very inconsistent: probably one in a thousand emails causes this and it doesn't seem to have any relation to the extensions of the attachments; which are exclusively PDFs, Docx, rtf, xlsx, html, or images.
So I'm dying for a way to either suppress the message, or build in something into the macro to circumvent it entirely, but I've absolutely no idea where to start since (as I said) all the search hits I get are only applicable to incoming mail items.
Help?!
Thanks!
There are two aspects of sending emails in Outlook:
Outlook security prompts. "Security" in this context refers to the so-called "object model guard" that triggers security prompts and blocks access to certain features in an effort to prevent malicious programs from harvesting email addresses from Outlook data and using Outlook to propagate viruses and spam. Read more about that in the Outlook "Object Model Guard" Security Issues for Developers article.
"Outlook blocked access to the following potentially unsafe attachments" message in Outlook.