How to display all recipients in an email - email

I am currently using SMTP in a .net application to send files automatically when the user prompts the system
We have recipients setup to receive certian SSRS files, some clients want all and some clients only want one report. As such, the user just hits send and we send each client a single email with their requirements.
The issue is that since we have added this flexibility the clients have lost who is receiving the file.
Is there anyway to list all the receipients of an email in the to section or am I going to have to move all the recipients to the body of the email?

Related

Amazon WorkMail: Can AWS SES and Lambda be used to manipulate a received email?

I run a WorkMail client which is used to view emails received by SES. I want to set up a lambda trigger than when it detects an email from an external client, I want certain text to be censored or add an [EXTERNAL] tag to the email before the user can view the email in WorkMail. So far, the only possible manipulation I've been able to do to the email is add headers which as far as I'm unaware, will be invisible to any user viewing the email in any client until they inspect source.
I'm essentially asking if this is even possible really, as it is something I've been tasked to do from my superiors. The only method otherwise of editing the emails I can see is downloading the email, then resending it after editing with a reply-to being the original sender.

How do email threads/chains work, and how do I ensure sending two emails separately will be merged together in a thread in the users email client?

I'm using AWS SES to send emails to customers. I want to send an initial email to confirm an action they've made on my website, and then send subsequent emails to that same email address to notify of any subsequent activity on that initial action.
Different email clients appear to implement this behaviour differently, and I've read about the thread-index header here, but that doesn't cover all clients.
Is there a standard way to mark that an email belongs to the thread of a previously sent email?
Thanks
When adding the References Header to Emails, you can add message-ids of previously sent emails in order to create email threads.
Of course it's again a topic of the client to fulfill this feature, but it should be supported by major email clients.
Heres an old blogpost about that. (considering that email is also old, it should be fine ;) )
https://wesmorgan.blogspot.com/2012/07/understanding-email-headers-part-ii.html

Email open tracking

I have to create email tracking system, but the problem is that when the sender opens an email this is counted as an opening by the recipient.
When I send an email through Polymail (or some other tools for tracking emails), then in the 'sent' folder I have an email without a tracking pixel, but the recipients of this email have the pixel and at the same time everyone have different code inside (I think, to determine which of the recipients opened the email).
How is this possible? The sender and the recipients have different contents of the same email. Can this be implemented using smtp / imap / gmail-api?
For standard IMAP/SMTP setups (specifically: not GMail), the message is submitted twice, once to SMTP to be sent, and again to IMAP to be placed in the Sent mailbox.
There is no requirement that these be the same: in fact, in normal use, the BCC header, for example, is submitted to IMAP, but not SMTP.
GMail, and a few others, while trying to be helpful and save bandwidth, do the copy automatically, but make it impossible to supply different versions. (Unless you want to try to find the duplicates and delete them out of band).
Current Email protocols don't send any kind of ACK to the Sender when mail is opened. So you need to put some kind of analytic tool inside the mail contents to keep the track of it.
Some suggested methods and widely used tool is Bananatag.
Alternatively, you can use custom Google Analytics for the same. Refer here https://dyn.com/blog/tracking-email-opens-via-google-analytics/

Get MessageID of a sent mail in Outlook

I'm currently writing on an Outlook VSTO AddIn. Using this AddIn, I would like to keep track of E-Mail conversations and be able to uniquely identify mail messages. We are using Exchange as MTA.
For all the mails in the Inbox (and many other folders) I can use the Message ID from the mail's header to do the matching, but mails lying in the "Sent Items" folder do not have a Message ID set.
Is there a way to get the Message IDs from those mails?
(I guess that the mails do not have a header, as they are placed in the folder before being sent; but after sending the mail, the MTA gives a message with status code 250 which contains the Message ID.) Does Outlook know about or somehow save the MessageID? How can Outlook keep track of conversations, if it doesn't know the MessageID?
Is there another way to identify a mail?
First let us clarify why do you mean by
Is there another way to identify a mail
Actually you can duplicate an email then, they will have the same MessageID but different ItemId. If you have multiple recipients: toms#gmail.com, toms#an.exchange.mailbox.com, toms2#an.exchange.mailbox.com they will have the same MessageID (aka InternetMessageId) even the first one is not even Exchange. For the two others, there are two different messages within the same Exchange server. The have differents ItemID(aka EntryId).
Conclusion, the MessageID identifies the mail from its content and is set by the mailserver sending the email. To my knowledge there is no alternative (except creating your own "digest") from the immutable properties of an email. Keep also in mind that 'ItemId' changes when you move an email from a folder to another. See
For a VSTO add-in you can retrieve the MessageID aka InternetMessageId using Redemption.
The other alternative is to ask the ExchangeServer using MAPI or EWS.
In all cases there will be a 'server call' and it cannot be retrieve directly after sending because this property is set by Exchange Mail server.

Custom mailing list system

On our website we use a MySQL table which contains all users. Some of the users should be able to send mails to all users. Unfortunately I haven't got the right idea how to implement such a system.
My current design:
A privileged user writes a mail to users#website.com using his personal mail software.
A server is waiting for incoming mails.
As soon as it receives a mail, it matches the 'From' field with the database.
If the user is not found or hasn't got the special flag, discard the mail.
Forward the mail to all users (mail addresses are saved in the database)
Send the sender a confirmation mail.
How can I implement such a system? I'm not required to stick to a certain programming language even though C++, PHP or Node.JS would be preferred.
As a jumping off point, look into IMAP/SMTP. You can, with any language, log into an email inbox, get emails, read them, etc etc etc. Set up your mailbox with an account users#website.com that receives legitimate emails. Then set up a cron job that checks the inbox every 5 minutes or so. If no emails are found, then you are done. If there is an email there, process it, run your checks against your DB, and then send it using SMTP, and then send the confirmation to the user.
If handling IMAP is too hard, you may just want to make a form on your website that privileged users can use which sends the emails to the users.