How can I know if the mail received is a parent mail using vba - vba

I need to delete all replies and forwards to a mailbox.
I already have disabled the Reply, Reply To All and Forward from my master email template, but some people is using old mails to avoid creating a new one.
I am also checking the email subject for the strings "RE:" and "FWD:" to treat them as I want, but some people change the subject and I don't know how check if it's a original mail (parent mail).
Any suggestions?
Regards,
Elio Fernandes

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.

detect that an email is sent to a mailing-list

My application sends mails containing an authentication token. The user which receives the mail clicks on a link and is directed to a webpage. The app recognizes him.
The problem is that sometimes the mail is sent to a mailing list instead of a personal address. Then several people come on the page and override each others' actions.
There are 2 ways I think I could solve this :
detect that the email address is a mailing list before I send the mail
include the final recipient address in the link in the email.
Is any of the 2 possible ?
No.
The recipient can tell if the message came from a mailing list (if the list follows the right guidlines), but the sender can't.
There is no way for the sender to modify the body of an email dynamically based on the final recipient.
David's answer is correct. Though, depending on your context you may find the following idea useful:
You might be able to record the number of clicks per email sent out using that token and just specify a threshold. If the number of times the auth token exceeds it, flag the recipient as a mailing list and exclude them from future mailings.

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