Determines .msg attachment is opened in outlook window - email

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.

Related

How do I forward a mail message as an attachment in MS Graph?

I'm retrieving all the messages from a given mailbox, and if one of them contains problematic attachments, I want to send an email to the sender of that message, explaining the problem, and including the original email as an attachment.
I need to either put the message into a stream, or save it to the filesystem. I imagine the former would be better, but I can't see any methods that can do that.
How big are the attachments that you want to forward? With the Graph there is a 4MB limit that you will hit with some of the endpoints that will restrict the methods you can use to do this. Eg if all the Messages are under 4MB then you could either attachment them as an Item attachment https://learn.microsoft.com/en-us/graph/api/message-post-attachments?view=graph-rest-1.0&tabs=http but for your purposes you'll loose fidelity on things like Internet Message headers which won't help with working out what's gone wrong with the message. Probably what you want to do is download the message first as MIME https://learn.microsoft.com/en-us/graph/outlook-get-mime-message save it as an Eml file and then attach that file. If you need to deal with 4MB+ emails you need to check the size and use https://learn.microsoft.com/en-us/graph/outlook-large-attachments?tabs=http when necessary.

Outlook 2010 remove attachment of specific type (e.g. *.txt) when sending email

I've a question about Outlook 2010.
When an user wants to send an email with an attachment of type *.txt I'd like to remove this attachment when he hit the button [Send].
I'm looking for setting a filter in the FilterDialog or setting a registry key.
I've found something like: https://chornsokun.wordpress.com/2008/01/03/level1remove-unblockblock-file-attachments-in-ms-outlook/
But this still send the file with the email.
Regards
Jan
You can handle the ItemSend event of the Application class which is fired whenever an Microsoft Outlook item is sent, either by the user through an Inspector (before the inspector is closed, but after the user clicks the Send button) or when the Send method for an Outlook item, such as MailItem, is used in a program.
In the ItemSend event handler you can inspect the Attachments property of the MailItem class which returns an Attachments object that represents all the attachments for the specified item.
The Remove method of the Attachments class removes an object from the collection. Or you can use the Delete method of the Attachment class which deletes an object from the collection.
Note, you may need to check the FileName property before removing.

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.

VBA Outlook - Get email addresses from attached .msg files

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.

Why does iPhone eMail signature go out as an attachment?

I am building an iPhone application that generates an email with an attachment. The eMail message window pops up showing the body text and attachment followed by the default "Sent from my iPhone" signature text.
Everything seems perfectly ok, except when the message is received by the recipient the signature "Send from my iPhone" has been converted into a text attachment instead of remaining as the last line of the body. What gives?
Update: It seems that it's only Outlook that exhibits this behaviour. When I view the message in iPad Mail the signature does show as body text, not an attachment.
How does the email view in other applications, such as Apple Mail, Eudora, Lotus Notes, Thunderbird, etc ?
I'm suspecting that it's to do with Outlook's anal attempts to "protect the user experience", the same as it does if you email an EXE file (won't let the recipient open it).
It's an Outlook issue. Go to Options, Mail, Message Format, then UNCHECK "Reduce message size by removing format information...." Click here to see:
Outlook Options