MSGraph .NET SDK: Problem forwarding emails with s/mime attachments - email

A windows service written in c# using MSGraph SDK v4.35 reads customer emails and downloads their .pdf or .tif/.tiff attachments for import. Some emails are arriving with .p7m attachments which are a multipart smime format which contains attachments as text, coded in Base64. I don't know if these were encrypted emails or just signed but I'm able to parse the content as mime and download the content as relevant image files, however, if I cannot download any image files, I need to notify the customer by email. When I try to forward the message to the customer using this MSGraph call
await graphClient
.Users[theAccount]
.Messages[theMessage.Id]
.Forward(toRecipients, null, comment)
.Request()
.PostAsync();
it fails, with the message
ErrorItemNotFound
Message: The specified object was not found in the store., The process failed to get the correct properties.
If the email has no attachments or standard attachments then it works OK. Is this a bug/unsupported feature, or is there something I can use in the call to make it work?
I tried updating the SDK to v4.44 but it stopped finding emails in certain customers' inboxes.

Related

Microsoft Graph API: Fetch attachments for a particular email not an entire email thread

I am using Microsoft Graph API to get attachments of particular email.
https://graph.microsoft.com/v1.0/users/<user-id>/messages/<message_id>/attachments
Above API returns attachments from previous conversation thread as well.
Suppose a mail was started and it had bunch of replies with attachments and my latest email contains only one attachment and in entire email there are like 5 attachments with latest message-id if i try to fetch attachment instead of returning 1 attachment, it returns all attachment.
Is there any filter available just to get that particular attachment of the given mail.
i tried to get attachments of that particular sent mail but instead i am getting attachments of entire thread

email signature with logo using CID Embedded Images (Inline Images)

Trying to build a powershell script to create an email signature for an office 365 email. The signature will have the company logo. The four patterns that can be used are:
CID Embedded Images (Inline Images)
Base64 Encoding
Attachments
Linked Images
number 3 is out, since every mail would have attachments.
number 4 was tried but outlook and most mail clients will not download external links for security reasons.
We tried number 2 and it does work in some clients. Office 365 isn't one of them....which leads me to the old school #1 option.
If we go to the Office 365 web portal and edit the signature you can easily add an image and format your signature, it uses method #1 internally. The problem I have is that we need to create these email signatures for hundreds of thousands of email accounts so we MUST automate it.
You can set a users email signature with the powershell command
Set-MailboxMessageConfiguration
you have to pass in a string for the signature which can be a mini HTML file. The problem is that we can't get a clean way to build a HTML file for the signature that includes a CID Embedded Images (Inline Images) since we have no way to know what the boundary value will be in the MIME message that gets created. We have the base64 encoded value of the image but can't see to find a way to get it to embed. So it will work in O365 AND outlook and other popular email clients.
Any idea how to do this in code? does not even have to be powershell... C# graph API maybe?
We are open to suggestions.. .
Thanks in advance..
-Ken

Is it possible to send multiple email attachments with zend_mail?

I found several examples of sending a single email attachment using zend_mail. But I cannot figure out how to send multiple attachments. Can someone share how to do this if it is possible. I have sendmail installed on the server.
Yes its possible to send more than one attachment in a Zend_Mail_Message.
Depending on what method you use for creating attachments, just call $mail->createAttachment() once per attachment, or create all of your attachments as Zend_Mime_Part objects and call $mail->addAttachment($part) once for each attachment.
See Zend Mail Attachments for examples. Just repeat the example once for each file you want to attach.

Email that allows auto responses via subject line with attachments

i want to host a email client on my web server that allows messages to be processed via subject line, i looked into roundcube's autoreply but that was only a global message for all incoming emails, for example, if my customer emailed me with subject line HOSTING, it would be filtered and sent an auto response with an attached pdf file of our hosting plans
I would actually use Gmail's filters to do this, as otherwise it would be quite complicated. I would forward all the mail to Gmail, and use Gmail's filters (and canned response lab feature) to respond with the PDF attachment.

How can a read receipt be suppressed?

I am programmatically "reading" emails using WebDav. I am also deleting these emails when I've finished having my way with them, however, this is causing an interesting problem. Each time I delete an email the original sender is getting a not read response. I have logged into Outlook Web App and checked the option Do not automatically send a response but this doesn't seem to help.
Is there ANY way to remove the request for read receipt from the email before deleting it?
We decided that we didn't want to make any modifications to our server and a solution that could be implemented in my existing program would be the most ideal.
I read on a few sites if the email was marked as read through IMAP commands on the exchange server that the read receipt would not be sent when deleted/opened via the client (Outlook Web App or Outlook). So that is what we did:
Logged into email server via IMAP
. LOGIN user#mailserver.com password
Selected the folder to process
. SELECT Inbox
Made the changes to all emails in the folder
. STORE 1:* flags \SEEN
This sequence marks all the emails in the inbox as read, which then allows my program to delete the emails after processing without a receipt being generated.