Skip to content

Commit

Permalink
Removed reference to outlook
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammed Bhatti committed Dec 30, 2019
1 parent 8c161c6 commit 7564094
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions taskt/Core/Automation/Commands/OutlookEmail.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
using System.Collections.Generic;
using taskt.UI.Forms;
using taskt.UI.CustomControls;
using Outlook = Microsoft.Office.Interop.Outlook;

namespace taskt.Core.Automation.Commands
{
[Serializable]
Expand Down Expand Up @@ -63,14 +61,14 @@ public override void RunCommand(object sender)

var splittext = vRecipients.Split(';');

Outlook.Application outlookApp = new Outlook.Application();
Outlook.MailItem mail = (Outlook.MailItem)outlookApp.CreateItem(Outlook.OlItemType.olMailItem);
Outlook.AddressEntry currentUser =
Microsoft.Office.Interop.Outlook.Application outlookApp = new Microsoft.Office.Interop.Outlook.Application();

Microsoft.Office.Interop.Outlook.MailItem mail = (Microsoft.Office.Interop.Outlook.MailItem)outlookApp.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem);
Microsoft.Office.Interop.Outlook.AddressEntry currentUser =
outlookApp.Session.CurrentUser.AddressEntry;
if (currentUser.Type == "EX")
{
Outlook.ExchangeUser manager =
Microsoft.Office.Interop.Outlook.ExchangeUser manager =
currentUser.GetExchangeUser().GetExchangeUserManager();
// Add recipient using display name, alias, or smtp address
foreach(var t in splittext)
Expand Down

0 comments on commit 7564094

Please sign in to comment.