VSTO - How to trace email body from bounce back email? - vsto

I'm new to develop VSTO. I have a Java schedule job to send email daily by SMTP.
If email is bounce back, my outlook would receive bounce back email.
Here is the question, since I used java program to send email, there is no copy in "sent items" folder. How can I trace back the original email Body from this bounce back email?
Thank you.

You can use the data from headers like Message-ID, To, From, Subject, Recieved property values for identifying the original item in Outlook.

Related

Outlook VBA - Rule on Missed Lync Conversations

I currently have a rule/VBA combo on all received e-mails that sends a brief e-mail info (sender, subject) to another address. However, this rule does not work on missed Lync conversations that do pop up in the Inbox. Is there any way to work around this?
Current setup for e-mails is using the Rule when message is received, run a script. The script then composes and sends an e-mail based on information on the received item.
Thank you.

Preventing an email from being sent to Outlook's Junk folder

I'm writing an application that creates a word document and emails it to a user from our shared mailbox. The code works fine, however the message is delivered to the Junk folder instead of the Inbox.
I believe this is because it's coming directly from the email address (mymailbox#company.com), instead of the mailbox name in our Global Address List (My Mailbox).
Is there a way to get VB.Net to recognize my Global Address List so I can send directly from the mailbox name; or is there another solution to this problem?
You can set the "from" address in mailmessage.from to the proper email address. However, the "from" address is usually not enough to get an email sent to the spam folder.
There are several steps you can take to make it more likely your email gets through. The links in the comment above Rachel Gallen cover these pretty well.
http://www.allspammedup.com/2009/09/7-ways-to-prevent-your-emails-being-blocked-as-spam/
http://www.interspire.com/content/2006/09/28/improve-your-email-delivery-rates/
Just why something ends up in the junk mail is something set by the recipient's email client and/or ISP and not something you have control over. You may be able to maximise your chances of appearing to be non-spam by making your email have fewer spammy characteristics - if you could re-cast your sending system to create the message as an email rather than an attachment this may help.

Storing selected emails from outlook in SQL Server by forwarding

This may not be possible but just wanted to see if anyone could point me in the right direction.
I am building a system that needs to store all corespondence between the company and each client.
Is it possible to forward an email from outlook to a certain email address that will then store this email in an SQL server.
Thanks for any help.
You can try this Outlook Add-on: www.geniusconnect.com
Link Sent Items Outlook Folder to your table and check "Auto Save" option. This will save sent items automatically to DB.
You could write an outlook add-on using .NET that inserts the contents of the e-mail into a SQL Server table and the sender information.
Try looking at it the other way around. Build your email in the database first, then have a separate process actually send out the emails. After every successful send, you mark database email record as "sent".
I recommend an asynchronous approach. As emails are to be sent, they are generated and stored in an EmailQueue table. Another process monitors the EmailQueue table and sends out the emails as it discovers them. This way any delay with the actual sending of email will not interfere with the process that is generating the emails to be sent.

Can Outlook Interop API not recognise a DeliveryNotification

Story goes: My user sends an email to their client. My user ticks of "delivery notification" / "read notification". The client responds on the notification. Now my user has a "notification" sitting in their inbox. My application may attach that "email" to a project database, happens with any other regular email.
Now a bug report ticks in (feature request) on my table. My user like to attach those "notifications" to the project in question, but my application does not recognise the notification as an email.
Having recieved this feature/bug request, I start investigating. When I right click the mail in question I'd expect to have the option of attaching the mail to a project. I do with regular emails, but not with the notification email.
First off: Isn't a delivery/ read notification just like any other email. Apparently not as it is not being recognised in the first run.
Second: If it isn't an email, what is it then. Apparently it does not exist. WT'bip'...
I found an enum DeliveryNotificationOptions under System.Net.Mail, but I'm using the Microsoft.Office.Interop.Outlook and the MailItem in there. I found the MailItem.OriginatorDeliveryReportRequested which is what the client's mail application has replied to and sent my user the notification.
I have the Outlook addin both as an Office2007(.Net3.5) and Office2010(.Net4) version, the 2003 has been retired. The way I see this it goes beyond office and .net version concerns.
Any light or pointers people like to share on this matter would be appreciated.
It's called a ReportItem (DeliveryNotification).

Track bounced back newsletter emails

I've built a newsletter system which tracks:
Openings
Link clicks
Unsubscriptions
However, I need to find a way of tracking which newsletter emails 'bounced back'.
Has anyone done this before and whats the best way of doing it?
When sending the mail via SMTP you supply the FROM command which is sometimes referred to as the 'Sender' or 'Envelope Sender'. This is separate from the From: header in the email itself. What you want to do is to create a 'bounced' mailbox and set that as the 'Sender' for the email. If there is a bounce, then most mail servers will send a (NDR) notification back to this sender.
Then you need to periodically check this mailbox for NDR's and parse them for the original recipient and if it was a hard or soft bounce. There are various libraries that can do this for you such as ListNanny