Restrict email recipients based on email keyword in MS Outlook 2010 - email

I work in a medical study where study coordinators at several off-site locations will be sending sensitive data via email attachments. These emails will be encrypted, but I cannot have the emails going to anyone but one or two specific recipients. I need a method to restrict who can receive email attachments based on a keyword in the email subject line. We are using MS Outlook 2010.
Ideally, it'd work this way: If the sender's email's subject line includes a keyword like 'RestrictedEmail' then only designated email recipients (for example, king#kong.com or robin#hood.com) can receive the email, else, the email will not send.
I didn't see this elsewhere in archives. Maybe I'm not using the right keywords...
Thanks in advance!

Trap the Application.ItemSend event, look at the message subject (Mail.Subject). If the match is found, loop through the MailItem.Recipients collection and check each Recipient.Address property to make sure only approved addresses are present.

Related

Forcing new thread in Gmail

We send an automated email whenever someone signs up for our app.
The subject is always the same for every user.
Let's say the subject is 'Welcome'.
The problem is that whenever someone replies, it always end up in a single giant thread in gmail.
So the emails from various users are interleaved with each other, which makes it very difficult to manage.
What we want is a single thread per user (i.e per recipient email address) so that we can keep the conversation with each person separate.
I'm aware that gmail has its own way of grouping messages into thread based on the subject line by default.
However, we noticed that some support tools (such as Zendesk) have somehow find a way to keep each email separate even though the same subject line is used. They seem to have a work around.
What I mean is that we have received multiple emails from the Zendesk email sender with the same subject and somehow they end up in multiple threads in our gmail.
They don't seem to use a uniquely generated email either. The from and reply-to address is simply support#domain.com
How do they do it?
We experimented with the 'Message-ID' and 'In-Reply-To' SMTP headers but were unsuccessful.
Sending emails with different Message-ID still end up in the same thread.
See example of a Zendesk email received to my gmail address below:
Since I can't post in the comment, will add to the answer here. Sample headers in an email I received from Zendesk. Note that they use the support email address + the ID of the support ticket as the 'Reply-To' address.

email bounceback tracking with personalized subjects?

How do you handle email bouncebacks with personalized subjects? We send bulk emails to thousands of clients daily. Currently we run a script that combs our inbox and places all emails with the same subject into various folders that match our SQL database. This works great until a personalized email subject is sent. Because these emails all have unique subjects our script ignores these emails. Does anyone have any suggestions on how to handle this? We can't always say ignore the first part of the email because what if the personalized part comes in the middle of the subject. We thought about passing a unique code into the subject that would be hidden...but this doesn't seem to work across all email clients. Any thoughts or suggestions would be really appreciated. Thank you all!
*added so when our script runs it is done through a process that compares the subject to our database using a dictionary that looks for exact matches.
When the email is sent out personalized, are there phrases that you use to personalize the subject? If so, I would keep track of the outbound subject phrases and tokenize the non personalized parts of the subjects. When the message bounces back, and it matches a personalized outbound subject, you can strip out the personalized strings, and you would be left with a matching set of tokens in the subject that match your out bound subject tokens.
If the subjects are sent out automated but completely personalized with no common tokens, you can store the target address and subject on the outbound route. When you get a bounce back that is randomly personalized, you can look in the outbound storage for the same recipient, subject combination and infer that the message is a personlized subject that indeed bounced back.

Unique identifiers within a 'mailto' link

I am sending a bunch of emails to a list of clients, approx 200-500. I am wondering if there is a way I can identify the replies, other than from the email address.
Eg. I could send two emails to the same email address as a husband and wife share that email address.
I am not a code expert by any means (or even an amatuer!) and will be using Outlook to send these emails.
Here is a crude example of what i am using at the moment:
mailto:reidster#work.com?subject=this%20is%20a%20test%201&body=I%20opt%20out%20of%20email%201
&
mailto:reidster#work.com?subject=this%20is%20a%20test%202&body=I%20opt%20out%20of%20email%202
Any assistance much appreciated
You could make a rule in Outlook,
that says Take all Emails from this clients and put them in one folder.
Or if there is the same subject: if there is a subject with this words put them in one folder.
Is it that what you mean ?

Is it safe to generate an email subject from the body?

I'm writing an app which allows users to send out a text-only email to a bunch of recipients. I want to try and generate the subject of this email from the body of the message, to avoid the need for a subject field
Is it safe enough to do this? Are these emails likely to fall foul of spam filters?
I'm already scanning the entire email for spam words, so there won't be any in the subject
you could download the widely used spamfilter Spamassassin and search for 'SUBJ' in the *.cf files, this will give you many spamrules that trigger based on subject (like empty subject, all caps, bad words, bad encoding of non-ascii characters etc)
I would suggest that if the mail is from a trusted source then there is not a problem. On the other hand since the mailbox dosent know that the subject is generated automatically it does not matter to them. And the third thing is that you need to check the guidelines that the email filters follow. Check out some ope source mail filter.

For non-customized bulk email, is it better to use the BCC field, or generate a separate email with To header for each recipient?

I'm generating a bulk mailing each day for users who want to receive the daily deals. I can either send a separate physical email with each user specified on their own unique To header, or I can send one email with all the users on the BCC line.
Obviously if I ever want to create user specific content I will need to customize the emails per user and send them individually, but if I don't want customized email right now, should I just send out the single email with everyone on BCC? Any reason to NOT do that.
Edit: I'm using a third party as my gateway that specializes in delivery with CAN-SPAM compliance, etc.. not trying to do this off my own mail server...
Update: I guess I'm really also looking for some metrics here. Is there a difference in open rates of BCC'ed email vs To field email? What about spam filtering rules that might pre-classify based on the BCC field?
No reason I can think off for NOT doing it. Using BCC is the polite way to send bulk emails.
In this case, it turns out that the correct answer was neither. The gateway provided a custom header API that allowed me to specify all the recipients in a secondary "To" field. The API then handled the blind delivery of the emails, and also did variable substitution for me so I didn't have to transmit all the duplicate content multiple times. The API then handled doing "best practices delivery of the email".