Avoid sending meeting invite as attachment when auto-forwarding in Outlook 2007 - outlook

I setup a rule in Outlook 2007 (my work email client) to auto-forward all meeting invites to my Gmail account so I can add them to Google Calendar. I made sure the action I selected was "forward it to people or distribution list" instead of "forward it to people or distribution list as attachment". Despite this, when I look at the forwarded email in Gmail, it just has an attachment with no extension with the name of the meeting. On the other hand, if I forward the invite manually, it is correctly recognized by Gmail as an email invitation. Anything that I might be missing?

Try to change the rule to run a VBA script instead. In that case you will be able to forward the meeting request item programmatically. For example, the code should look like:
Public Sub Test(item as MeetingItem)
' do whatever you need
End Sub
You can call the Forward method of the MeetingItem class to execute the Forward action for an item. It returns the resulting copy as a MeetingItem object.

Related

Outlook API, Message Moved to "Sent Items" still beign marked as "[Draft]"

I'm working on an Outlook Add-in, using office.js, where users can send secure emails using backend service.
In compose mode, when the user sends the email, using the add-in of course, the add-in will then move the message to "Sent Items" folder using the Outlook API /message/{id}/move and everything goes OK with the exception that the message in question still being marked as "Draft" by Outlook which is really annoying and does confuse the user who just sent the email by telling him that "this message hasn't been sent"
I searched through the API to see if there is a way to mark an email as "SENT" in order to prevent Outlook from showing this RED hint but with no luck so far!
So, My Question Is: Is there any way to overcome this misleading msg by marking the email as it was sent by Outlook?
Thanks in advance.
Finally, I was able to achieve a perfect solution for this challenge.
Based on:
#BrianClink's comment
This answer (Which uses Graph API but Outlook REST API): Microsoft Graph API mail office 365: Is any option create inbox message NOT as Draft?
The approach/steps I followed to mark a mailItem as "SENT" (and not shown as 'draft') and put it in "SentItems" Folder are as follow:
First, Save the mailItem as "draft" using Office.context.mailbox.item.currentMail.saveAsync then retrieve its ID
Clone this draft mailItem properties eg: 'Sender', 'Subject', 'Body', 'ToRecipients'..etc so you get an exact copy of it.
With the newly cloned mailItem, add '[SingleValueExtendedProperties]' property with this value :
[
{
PropertyId: 'Integer 0x0E07',
Value: '1'
}
];
Serialize the new item as JSON and POST it to "sentitems" folder as follows:
xhr.open('POST', restHost + '/v2.0/me/MailFolders/sentitems/messages/');
xhr.send(clonedEmailJson);
On success, with xhr.status=201 [created], Remove the draft mailitem using a [DELETE] request
And you will end up having a new mail item created in your "sentItems" folder which appears as it was sent by Outlook :)
This was a very helpful solution to me because my users are using my add-in to send secure emails (using 3rd party API) and NOT Outlook, So, I wanted them to have the same UX/feeling as when they use Outlook.
Note:
Although the solution worked for me perfectly, it came with a price!
On slow internet connections or in case emails containing large attachments, the process can be remarkably slow, because the addin will first save the draft to the remote Exchange Server, get its ID, then duplicate it and send it again to the server, then remove the draft-ed one.

Logic Apps Email Trigger - Get original Alias

Found a very similar question here: Email aliases not returned as "To" address in logic app
TLDR: From within a logic app "When a new email arrives" trigger, How do I get the original alias that the email was sent to?
I have a logic app that creates a ticket based off an email sent to an outlook box. Now I want to be able to choose aspects of the ticket based off of whether or not the email was sent to the mailbox itself or an alias of the mailbox. The problem I'm having is that by the time logic apps gets a hold of the email, the alias address has already been replaced with the actual box's address ("alias1#place.com" -> "actualbox#place.com").
The actual mail in the inbox has the original email's alias information in the headers, but I can only get them by looking at the properties in outlook. I've tried to get the original "To" internetheader information both within logic apps (by exporting the email to blob storage and looking at headers there) and with the Microsoft Graph API. Sadly, the email exported by logic apps doesn't have the alias information and Graph API has pretty much every header but "To". At least one other person has lamented the lack of To
That said, the actual email still has the original alias information. Can someone help me get that information in logic apps without jumping through too many hoops? A many hoop solution is welcome if none other can be found though.
Use the Export email (V2) action from the Office 365 Outlook connector. This will give you the full message with original headers (including the actual To address)!
The flow here is, trigger on the incoming email, as you already are, then add the export email action providing the message id from that trigger to pull this specific email.
From there, you you'll have one big "body" property which you'll need to interrogate to find the To address.
Caveat on this though, it doesn't work when emails are sent between mailboxes in the same Office 365 tenant. Exchange Online will "helpfully" go, "I know that address... this is the address you wanted!"
What API are you using? In Outlook Object Model / MAPI / EWS, you need to retrieve the PR_TRANSPORT_MESSAGE_HEADERS MAPI property (DASL name http://schemas.microsoft.com/mapi/proptag/0x007D001F)
We arrived at a many hoop solution.
The "Primary" email box now has some rules that look at the internet headers mentioned above (Message -> Properties -> look for 'To:').
If it finds an alias there, it will put the email in a corresponding folder for each alias.
Then we have logic apps listening to each of the alias folders which will then send the email's information to the _Core logic app that does the actual processing.

Create text/calendar type email that triggers accept/reject/ignore options

I can programmatically create an email with an .ics file attached. The email gets sent, the recipient clicks the .ics attachment to add it to their calendar. This is easily done.
I want to try and make Outlook behave a little different. When the user previews the message it detects that its calendar type and throws a prompt asking the user to take some action. This action decides if it gets pushed into the calendar. In a perfect world to have accept/reject/ignore options would be super sweet. Is it possible to construct/send and email in such a way that Outlook can treat it different from a standard email? E.G perhaps altering the type (CONTENT-TYPE:text/calendar)?
Note - I have seen a solution where the body contains a link to the .ics file informing the user about the calendar invite details. It then has a click here to Accept. This is nice because the .ics file does not have to be attached.
I am workign in VBScript/VBS world although Im not sure this is all that important. Has anybody done this is any sense. Is it even possible?
edited:
I ended up using the EASendMail component located here it has an autoCalendar property which works really well. It embeds the .ics file as a text/calendar and send the message as a text/calendar. The outcome is perfect, just like it was actually sent from the outlook. It previews with with the action buttons and even loads the meeting in Outlook at tentative waiting for action
Your email needs to follow a proper MIME structure for it to be recognized as an invitation. See Multipart email with text and calendar: Outlook doesn't recognize ics

Can outlook (web) notify me that I have email?

I have two email accounts. One of them I use every day. The other one, I have to fire up a VPN, authenticate through a firewall, and then run Outlook Web Access. Triple-yuck.
I'd like to set up a rule that says "Whenever I receive an email to annoyingaccount#company.com, send an email to mydailyaccount#myworkplace.com letting me know to check annoyingaccount." I do not want am not allowed to forward the actual email to mydailyaccount. I simply want a notice that email is waiting for me.
I see options that will let me forward the email or send a text message, but I don't see an option to just send a boilerplate email. Is there something I'm missing, or a "trick" I need to do, or am I just out of luck?
There is not an option like this in the Rules Wizard.
You can forward the email to your account and use rules to:
File the AnnoyingAccount email in a folder (so it is out of the way)
Display an a custom message in your MyDailyAccount email.
Take a look at the the display a specific message in the New Item Alert window option found on the 2nd screen of the Rules Wizard.
Here is a quick How To:
http://www.howto-outlook.com/howto/newmailalert.htm

run a script or sanity check against outgoing emails in outlook 2010

Is there a way to setup Outlook 2010 to run a script or some other form of sanity-check when you attempt to SEND messages from the client? My specific situation is that I use the same outlook client for multiple accounts (work, gmail, VPS server, etc) and I've found myself a couple of times sending emails "from" the wrong account.
In a perfect world I'd want to be able to write a script with logic something like the following:
when (I hit send)
if (the "source" account is "myuserid#gmail.com") then
if (there are addresses in TO or CC that match "work.com") then
pop up a dialog box that says:
"You appear to be sending email to work.com from gmail.com - do you really want to do this?"
if yes, then send it and return
if no, go back to the message compose window
that way, I'd have to actually very intentionally use a non-work email address to send email to the work people (which is rare in my particular case)
Try SendUsingAccount to read the "source" account in ItemSend.

Resources