Intercepting Microsoft Exchange Mail Send Events - c#

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.

Related

Email Reply Notifications in Office 365 API

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!

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.

how to know the different status of sended email in c#

I am Creating an application in c# . I have to know how can I know the status of the sended email.The status May be.
4. Track sent emails to determine if they were:
4.1 delivered
4.2 opened
4.3 recipient opt-out
4.4 bounced (with the reason for the bounce)
4.5 time/date sent
4.6 which links in the email were clicked (and time/date they were clicked)
4.7 IP address, if user clicked any links in the email
Should I use Any API or Dll or something else.Please help .Any Help will be Appreciated.
If you program your application to send mail through a hosted SMTP server like http://www.sendgrid.com or http://www.ultrasmtp.com, you can access the delivery status of messages that you've sent.
There is no easy way to do what you want. Actually this status can be tracked by your SMTP server itself and if you are using some third-party SMTP server like GMail or any corporate server, I 'm afraid they won't give you access to those information without using a authenticated client.
From your C# program, if the SmtpClient.Send() method returns true, you can assume the mail has been delivered to the SMTP server. If in case, the delivary fails, you should receive a mail to the outbound mail ID's inbox. If you want to make outbound mails appear in your outbox, you should configure IMAP/POP3 configurations accordingly.
There is no API or DLL available in exact form you want, as far as I know. You can try some other way like tracking a hash or embedded image in the mail-body from your server. But these are not reliable way as most mordern Messaging services have counter-measures for this.

Is there any way to send email with attachment in windows phone

Its really frustating that EmailComposeTask doesn't have any way to send attachments. I googled this and found MailMessage dll. I don't know whether it is secure or not because user gonna send his password.
Now I am thinking tot build my own service, send data from phone to service, and service will use smtp to send email with attachment.
Now I want to ask, Am I right? What kind of service I use?
I dont know about security concerns of MailMesssage.dll.
However, if you wish to send transactional EMails, then there are few services available. In such a case, you will not be required to create your own service. The popular one's are:
Sendgrid
Mandrill by MailChimp
MailGun by Rackspace
All services provide free tier and may be helpful, if you need to send, less EMails. Moreover, besides SMTP, these services provide Web APIs, so you can send mails using REST interface.

EMAIL from web server

We have a website sending mail alerts to end users. The site has been developed in c# ASP.NET.
I want to find the best way to send the email alerts to my users. Making sure the mail is not trapped in any spam filters. I read on the internet it is best to sent the mail directly from the web server and not route via an SMTP mail service such as google apps or Postini.
Can anyone tell me if this is correct?
First of all
Making sure the mail is not trapped in
any spam filters
Is not possible - otherwise spammers would do this. You just have to make sure you're domain isn't associated with any spamming activities and watch for keywords within the email.
I read on the internet it is best to
sent the mail directly from the web
server and not route via an SMTP mail
service such as google apps or
Postini.
This point doesn't make sense - your e-mail will never be delivered if it doesn't get routed via an SMTP server, the average message will pass through multiple on its route to the recipient.
The answer is to not actually send email and let someone else deal with the problem. I'd look at postmark or Amazon's simple email service.
We had problems that mails sent with local server often get trapped in spam filters until we implemented SPF on our mail server.
http://en.wikipedia.org/wiki/Sender_Policy_Framework
But I am not admin, that's just what our admin said, and after that we have no problems anymore.
btw. maybe would be better to ask on serverfault.com

Categories

Resources