Email Reply Notifications in Office 365 API - c#

I'm hooking a custom CRM app into office 365 emails using the graph sdk and web hooks (or notifications as the doc calls it) to listen to the inbox so that when a user sends or receives a message from outlook (or any client) the CRM system saves the email in a database and grabs attachments.
So far I've successfully wired everything up for when a user receives an email using the created notification, but I can't figure out how to interpret and capture the data from when a user hits reply and sends or when they create a new message and send - When I subscribe to the edit notification (and I'm just assuming the delete notification isn't helpful here) it just sends me a copy of the original message when the user replies and doesn't send me anything when they create and send a new email.
Any doc references or tutorials on this will be helpful. Thanks!

Related

Does Office 365 have a preferred way of sending attachments when using MailKit?

I've written a console application which sends out emails, I'm attaching the emails using the BodyBuilder() class like so...
builder.Attachments.Add(path + id + ".docx");
If I send these emails using an on prem exchange server, they're attached and viewable fine, if I send them using Office 365, they're sent and received fine, the attachments are attached fine, however the files appear to be corrupt and can not be viewed.
Do I need to do something extra in order to attach them properly when using Office 365 to send the emails?
Thanks,

c# MailKit - Read receipt

Does anybody know if MailKit supports a read receipt (reply message on read)? I have not found anything on the web or on Stackoverflow.
Read receipts (i.e. automated messages being sent when a user opens a message) is not something that MailKit can do automatically, it must be implemented by the software using MailKit or by the mail server.
This feature is something that generally only groupware suites like Microsoft Exchange, Lotus Notes, and Novell Groupwise implement.
It is a feature that can be implemented by the mail server or by the mail client, but it is not a feature of any of the mail protocols and so MailKit does not implement it.
If you would like to support sending read receipts, you will need to automatically create a MimeMessage with a MessageDispositionNotification body part and send it when the user opens/reads a message in your client program.
To request a read receipt for a MimeMessage, you will need to set the Disposition-Notification-To header field like this:
message.Headers[HeaderId.DispositionNotificationTo] = "me#example.com";
If the receiving user agent supports read receipts and it is configured to send them, then you will theoretically receive one when the user reads the message.
For more information about read receipts, see rfc3798.

Sync sent mail with Sent folder

I need to sync sent mails with the sent folders of mail servers, for the users to see at future moments. I can send mails using all these 3 ways, SMTP, CDO and Microsoft Outlook Object(MOO); out of which I can only see my sent mails with MOO. Now the problem is, Not all clients are using outlook, and thus its more impractical to use this.
Out of exercise, I had also used MAPI to send mails, but that don't send HTML body. Also I looked over this topic Microsoft Sent folder, but that don't solve my problem.
So is there anyway, I can send mail with HTML body and sync the sent mail with Sent Folder. ?
Thanks.
You can do that with Extended MAPI (C++ or Delphi), but you probably mean Simple MAPI.
If you are connecting to an Exchange mailbox, EWS is another option.

Intercepting Microsoft Exchange Mail Send Events

Are there any examples which show how to hook into an Exchange mail send event?
I would like to
Add marketing information to all emails sent through our Exchange server when they are going to an external address.
Start a workflow when emails are sent
I know I could use transport rules to complete the first request, however this would need be implemented using .NET 3.5/4.0 and C# as it requires a custom GUI.

Programmatically Verify an email message reached an exchange mail box

I have a job that runs which sends out emails to our users to which starts off a work flow process in our company. Periodically, a user will swear up and down that they didn't receive the email - though, when we go to the mail administrator to pull an exchange report, 10 times out of 10 it's in their deleted items. :P
I'd like to be able to programmatically verify that messages sent via .net C# (System.Net.Mail I think) reached the user's mail box.
It's exchange 2007 and all messages are internal.
You can't with System.Net.Mail. You'll have to dig through Exchange's APIs to determine if an email is present in someone's email account.
http://support.microsoft.com/kb/813349
Set an account for catching all bounce backs. In this way you will know which ones reached and which ones did not. This is the best way to ensure emails reached.
Alternatively you can add read reciepts via message headers(by setting the Disposition-Notification-To). but again, user can chose not to read it...
I see two ways to do what you want:
Send emails with "delivery confirmation" On (not "read receipt", this can be dismissed by the user as CoddeToGlory said). Then it's jut a matter of monitoring the mailbox that receives these confirmations via any way it's appropiate to you: Exchange Web Services, Outlook+COM or VBA, MAPI, ...
Use the powershell interface to Exchange and capture the output of Get-MessageTrackingLog looking for StoreDriver + Deliver events.

Categories

Resources