VBA Outlook - Get email addresses from attached .msg files - email

I would like to have some code that helps me to get the email address of the sender of an attached .msg file.
I have an email with around 10 emails attached. I need to copy the sender address from them into the clipboard or an excel sheet.

You would need to
save the attachment as an msg file,
open it using Namespace.OpenSharedItem
once you open it as MailItem, you can read the MailItem.Sender properties.
You can also use Redemption (I am its author) - it allows to directly open the message attachments as RDOMail objects using RDOAttachment.EmbeddedMsg.

Related

Jenkins editable email notification attachment : Mail going without attachment

The jenkins editable email notification in sending the mail but without the attachment.The attachment is in the workspace of jenkins.Path of attachment jenkins\workspace\projectname\test.csv.In the Attachments field of the editable email notification i am specifying projectname/test.csv but the attachment is not getting send.
I have also tried **/projectname/test.csv ,**/test.csv , /projectname but nothing seems to work.
PS: File size is about 10MB.
Can you use the "Email-ext plugin". more information is available here : https://wiki.jenkins-ci.org/display/JENKINS/Email-ext+plugin
I used a added a execute shell to the build moving (cd) to the directory of the file and then coping (cp) the file to the workspace directory, i them rename (mv) it and then attach it.

Determines .msg attachment is opened in outlook window

Is there a way to determine whether or not a mail message that is opened in outlook window is a .msg attachment? I couldn't find anything usefull in the Outlook.MailItem object.
In other words, I have a mail item that has a .msg attachment in it.
Outlook opens a seperate message window when I double-clicked on the .msg attachment. The question is, is there a way to know whether or not the message is an attachment?
Thank's in advance.
Cheers,
Inoel
There is no reliable way to do that - you can check if MailItem.EntryId is empty, but it is also empty for the brand new unsaved messages. You can also check if MailItem.Sent is true. I don't know if there can be other cases when a message is sent yet does not have an entry id.

Lotus Notes Attachment embodied within the body of the mail not as an attachment

I've got a problem with Lotus Notes (apart from it's lotus notes), when we receive an e-mail with a csv attachment the attachment gets embodied into body of the message.
Is there any setting on the lotus server I can change to stop this from happening?
Anyone out-there with any ideas?
After over a week I've found out what the issue was. The email sender sent the email with a Context Description of inline rather then attachment thus lotus notes rather then notice that the file extension was csv took the inline factor literally.
Once I change the context description in notepad of the .msg file and resent the file it displayed correctly.

Extract Email Address from Nested Tables in HTML Emails

I will be receiving approx 500 emails over the next day or so. The emails are all identical in layout i.e. HTML emails that display information inside a table. There are nested tables within the email.
I need to extract the email address from each email and store it in a file (text/csv). Rather than "copy & paste", is there a php script or some browser plugin I can use to do this?
GF
I will use php parse by id,class or name and a little script to go throw all the pages inside that folder to extract it as a csv I'll use fputcsv.
Hope it helped.

How to automatically save emails to ascii files?

I have a data stream that will be sent as daily emails containing temperature and wind speed from a measurement site. I would like to to automatically filter out these emails from the other emails I receive, then save the email body content to its own text file. Each text file must have a distinct file name; for example it could include the time that the email was sent or received. All files must all end up in a chosen directory. And ideally the process would be robust enough that it could run unattended for weeks. Our email system is Outlook but I could choose to send the email to my gmail account, for example. What is the big picture of how to do this?
Bigger picture: create a VBA script that runs on the Items_ItemAdd event, which fires whenever an email arrives.
Specifics: Use the solution on this page, but in the Items_ItemAdd routine change the olSaveAsMsg to olSaveAsTxt to get the text format you want.
Note that the file name format in the example should match what you need, but you'll need to add criteria to the Items_ItemAdd routine to check that the message is one that you want to save. For example, you could read the Item.Subject property.
it means you are working with exchange, i suggest to use imap protocol to read the mails, and you will be able to save the body.