Giter VIP home page Giter VIP logo

mail2bug's Introduction

What is Mail2Bug?

Overview

Mail2Bug is a service that allows you to create a bug from an e-mail thread simply by adding a specific recipient to the mail thread. It also keeps the bug up-to-date with information from the mail thread by adding any subsequent replies on the thread as comments to the bug.

Why Mail2Bug?

Simply put, the idea is to reduce friction and effort. Ever been on an e-mail thread where some issue was discussed, when at some point someone asked you to “Please open a bug for this issue”? Mail2Bug tries to reduce the effort associated with that scenario by allowing you to easily create a bug with all the information from the thread with the simple action of adding the relevant alias to the thread. It also keeps the TFS item up to date with any new information from the thread, making sure that information is not lost and is easy to find by looking at the bug

Another common scenario is for support organizations - for automatically creating a ticket for incoming emails, and keeping further communications on the email thread updated in the ticket.

Key Features

  • Creates work items from email threads
    • Supports MS Team Foundation Server (TFS) and Visual Studio Team Services (VSTS)
  • Updates the work item with further emails on the original thread, keeping it up to date without requiring manual copying of that information to the item
  • Adds attachments from the email to the work item (as file attachments)
  • Default values for work item fields set by the tool administrator
  • Work item fields can be overridden with a specific value by including special text in the message body
    • By specifying an explicit override (i.e. FieldName:FieldValue)
    • By using "mnemonics", defined in the config, for commonly overridden fields (e.g. the area path)
    • Based on the current date (useful for iteration paths)
  • Supports Exchange e-mail accounts, including Office365
    • Requires EWS to be enabled
    • Requires Exchange2010 or newer
  • Supports Unicode text
  • Secure credential/secrets storage using DPAPI or Azure KeyVault
    • Read this blog post on how to set up Mail2Bug as an Azure service

Usage

Once Mail2Bug is deployed and configured, just add the appropriate email address to the 'To' or 'Cc' line of an email to have a work item created for the thread.

  • You can specify an explicit override in the form of ###FieldName:Value simply by putting that text in the body of the email. This will set the specified field to the specified value.
  • You can specify a mnemonic in the form of @@@mnemonic simply by putting that text in the body of the email. This will set all the relevant fields defined for the mnemonic. Mnemonics are defined in the configuration by the tool administrator.
  • You can "link" a thread to an existing item by putting a string of the form work item #1234 in the subject or alternatively put a string of the form !!!work item #1234 in the email body
  • The actual format for specifying overrides, mnemonics, and append-only threads is configurable - the format specified above is the standard default configuration

How to build Mail2Bug

  • Requires Visual Studio 2012 or newer Visual Studio
  • Clone the repository locally
  • Open the solution file (Mail2Bug.sln) in Visual Studio
  • Make sure that NuGet is allowed to download packages automatically
    • This setting is under Tools->Options->PackageManager->General->Allow NuGet to download missing packages during build
    • This is needed because the packages are not checked in as part of the project, so they will be synced from the web during the first build
  • Build the solution
  • All the required binaries can will be in the output folders
    • For Mail2Bug itself, all binaries are under <projectRoot>\Mail2Bug\Bin\(Debug|Release)\...
    • For the DpapiTool, binaries are under <projectRoot>\Tools\DpapiTool\Bin\(Debug|Release)\...
  • See basic setup and configuration instructions in the wiki - Basic Setup

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

mail2bug's People

Contributors

bergbria avatar davisjms avatar davisjr avatar dependabot[bot] avatar eduardoromo avatar gxclarke avatar hakv55 avatar hammyhavoc avatar hendrikmaarand avatar hershi avatar jeffwilcox avatar konpikwastaken avatar liran-dobrish avatar mbmccormick avatar microsoft-github-policy-service[bot] avatar selvasingh avatar vitru avatar vtbassmatt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mail2bug's Issues

Please add instructions how to get required OAuth properties to connect to VSO

Hello Hershi,

I'm trying to set up mail2bug against my VSO account but I'm having difficulties understanding what are the proper values for these fields:

<OAuthContext></OAuthContext> 
<OAuthResourceId></OAuthResourceId>
<OAuthClientId></OAuthClientId>

Any chance you can provide more details how to obtain this info for my VSO? Maybe an example?

Thanks,
Amir from Sinapis

Password management: Replace DPAPI with Credential Store (a.k.a. Vault)

Current way of storing passwords for logging in to email/TFS is by encrypting them with DPAPI and saving to a file.
The windows credential store is a more appropriate infrastructure for managing such credentials, and switching from one to the other would be mostly straightforward. As part of this change, retrieval of the password should be moved into the Config classes, such that the consumers won't care about how the credentials are protected

Feature request: Add support for linking work items

I have a supplier who is using automation to populate bugs into my instance via mail2bug. We want to also set parent-child-predecessor-successor relationships during the email triage transaction as well. Is this possible? If not, we have to manually go in and set this through the interface later on. Thanks

Reply email error

I have been working with the code for about two months now and ran into an issue when trying to process a reply email. I get the following error:

2017-03-29 11:28:09,104 [6] ERROR Mail2Bug.Mail2BugEngine [(null)] - Error processing message
Microsoft.TeamFoundation.WorkItemTracking.Client.UnexpectedErrorException: There is a problem on the server. Contact your Tea
m Foundation Server administrator. ---> System.Web.Services.Protocols.SoapException: Object reference not set to an instance
of an object.
at Microsoft.TeamFoundation.WorkItemTracking.Proxy.RetryHandler.HandleSoapException(SoapException se)
at Microsoft.TeamFoundation.WorkItemTracking.Proxy.WorkItemServer.Update(String requestId, XmlElement package, XmlElement&
result, MetadataTableHaveEntry[] metadataHave, String& dbStamp, IMetadataRowSets& metadata)
at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.SendUpdatePackage(XmlElement package, XmlElement& result
, Boolean bulk)
--- End of inner exception stack trace ---
at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.SendUpdatePackage(XmlElement package, XmlElement& result
, Boolean bulk)
at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.SaveWorkItems(WorkItem[] workitems, Boolean bulk, SaveFl
ags saveFlags)
at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem.Save(SaveFlags saveFlags)
at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem.Save()
at Mail2Bug.WorkItemManagement.TFSWorkItemManager.ValidateAndSaveWorkItem(WorkItem workItem) in C:\Users\kgoodman\Source\R
epos\mail2bug2\Mail2Bug\WorkItemManagement\TFSWorkItemManager.cs:line 390
at Mail2Bug.WorkItemManagement.TFSWorkItemManager.ModifyWorkItem(Int32 workItemId, String comment, Dictionary`2 values) in
C:\Users\kgoodman\Source\Repos\mail2bug2\Mail2Bug\WorkItemManagement\TFSWorkItemManager.cs:line 304
at Mail2Bug.MessageProcessingStrategies.SimpleBugStrategy.UpdateWorkItem(IIncomingEmailMessage message, Int32 workItemId)
in C:\Users\kgoodman\Source\Repos\mail2bug2\Mail2Bug\MessageProcessingStrategies\SimpleBugStrategy.cs:line 150
at Mail2Bug.MessageProcessingStrategies.SimpleBugStrategy.ProcessInboxMessage(IIncomingEmailMessage message) in C:\Users\k
goodman\Source\Repos\mail2bug2\Mail2Bug\MessageProcessingStrategies\SimpleBugStrategy.cs:line 44
at Mail2Bug.Mail2BugEngine.ProcessInboxInternal() in C:\Users\kgoodman\Source\Repos\mail2bug2\Mail2Bug\Mail2BugEngine.cs:l
ine 79

I'm only an intern so I appreciate any help you can offer. Thanks!

Index out of range - EWS issue

So I've been wrestling with setting it up for a couple of days here, and I'm pretty confident that it's something that has to do with it signing into EWS.

Below is my log for the run. I've tried it with a couple of different methods (two different accounts) and have run the testconnectivity.microsoft.com ews test which turned out green (not all the way, so that's a thing.)

But I was just looking for a little confirmation that it was the road I needed to jump down.

2016-08-22 16:07:37,476 [1] INFO Mail2Bug.MainApp [(null)] - Initializing engine for instance 'LegacyDefect' (Persistent? True)
2016-08-22 16:07:37,532 [1] INFO Mail2Bug.Mail2BugEngine [(null)] - Initalizing MailboxManager
2016-08-22 16:07:37,539 [1] INFO Mail2Bug.Helpers.DPAPIHelper [(null)] - Reading encrypted data from file .\Resources\password.bin
2016-08-22 16:07:37,546 [1] INFO Mail2Bug.Email.EWS.EWSConnectionManger [(null)] - Creating FolderMailboxManager for ([email protected], [email protected], 1761024201, False)
2016-08-22 16:07:38,073 [1] ERROR Mail2Bug.MainApp [(null)] - Exception while initializing instance 'LegacyDefect'
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at System.DirectoryServices.ResultPropertyValueCollection.get_Item(Int32 index)
at Microsoft.Exchange.WebServices.Autodiscover.DirectoryHelper.GetScpUrlList(String domainName, String ldapPath, Int32& maxHops)
at Microsoft.Exchange.WebServices.Autodiscover.DirectoryHelper.GetAutodiscoverScpUrlsForDomain(String domainName)
at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.GetAutodiscoverServiceUrls(String domainName, Int32& scpHostCount)
at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.GetAutodiscoverServiceHosts(String domainName, Int32& scpHostCount)
at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.GetSettings[TGetSettingsResponseCollection,TSettingName](List1 identities, List1 settings, Nullable1 requestedVersion, GetSettingsMethod2 getSettingsMethod, Func1 getDomainMethod) at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.GetUserSettings(List1 smtpAddresses, List1 settings) at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.InternalGetSoapUserSettings(String smtpAddress, List1 requestedSettings)
at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.GetUserSettings(String userSmtpAddress, UserSettingName[] userSettingNames)
at Microsoft.Exchange.WebServices.Data.ExchangeService.GetAutodiscoverUrl(String emailAddress, ExchangeVersion requestedServerVersion, AutodiscoverRedirectionUrlValidationCallback validateRedirectionUrlCallback)
at Microsoft.Exchange.WebServices.Data.ExchangeService.AutodiscoverUrl(String emailAddress, AutodiscoverRedirectionUrlValidationCallback validateRedirectionUrlCallback)
at Mail2Bug.Email.EWS.EWSConnectionManger.ConnectToEWS(Credentials credentials, Boolean useConversationGuidOnly) in C:\Mail2bug\Mail2Bug\Email\EWS\EWSConnectionManger.cs:line 91
at Mail2Bug.Email.EWS.EWSConnectionManger.GetConnection(Credentials credentials, Boolean useConversationGuidOnly) in C:\Mail2bug\Mail2Bug\Email\EWS\EWSConnectionManger.cs:line 61
at Mail2Bug.Email.MailboxManagerFactory.CreateMailboxManager(EmailSettings emailSettings) in C:\Mail2bug\Mail2Bug\Email\MailboxManagerFactory.cs:line 29
at Mail2Bug.Mail2BugEngine..ctor(InstanceConfig configInstance, MailboxManagerFactory mailboxManagerFactory) in C:\Mail2bug\Mail2Bug\Mail2BugEngine.cs:line 31
at Mail2Bug.PersistentInstanceRunner..ctor(InstanceConfig instanceConfig, MailboxManagerFactory mailboxManagerFactory) in C:\Mail2bug\Mail2Bug\InstanceRunner.cs:line 21
at Mail2Bug.MainApp.InitInstances(IEnumerable`1 configs) in C:\Mail2bug\Mail2Bug\Main.cs:line 214
2016-08-22 16:07:38,091 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 0 ---------------
2016-08-22 16:07:39,095 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 1 ---------------

The Autodiscover service couldn't be located.

I was trying to setup Mail 2 Bug Service. Once i run the service, it given me error that autodiscover service couldnot be loaded.

C:\Users\mapar\Desktop\MAIL2BUG\Service>Mail2Bug.exe
2017-05-29 14:53:19,765 [1] INFO Mail2Bug.MainApp [(null)] - Initializing engine for instance 'STCI Email Extraction Customer DSAT' (Persistent? True)
2017-05-29 14:53:19,794 [1] INFO Mail2Bug.Mail2BugEngine [(null)] - Initalizing MailboxManager
2017-05-29 14:53:19,812 [1] INFO Mail2Bug.Helpers.DPAPIHelper [(null)] - Reading encrypted data from file .\Resources\mail2bug.bin
2017-05-29 14:53:19,825 [1] INFO Mail2Bug.Email.EWS.EWSConnectionManger [(null)] - Creating FolderMailboxManager for ([email protected], FAREAST\mapar, -485684100, False)
2017-05-29 14:53:48,873 [1] ERROR Mail2Bug.MainApp [(null)] - Exception while initializing instance 'STCI Email Extraction Customer DSAT'
Microsoft.Exchange.WebServices.Data.AutodiscoverLocalException**: The Autodiscover service couldn't be located.**
at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.InternalGetLegacyUserSettings[TSettings](String emailAddress, List1 redirectionEmailAddresses, Int32& currentHop) at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.InternalGetLegacyUserSettings[TSettings](String emailAddress, List1 redirectionEmailAddresses, Int32& currentHop)
at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.InternalGetLegacyUserSettings[TSettings](String emailAddress, List1 redirectionEmailAddresses, Int32& currentHop) at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.GetLegacyUserSettings[TSettings](String emailAddress) at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.InternalGetLegacyUserSettings(String emailAddress, List1 requestedSettings)
at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.GetUserSettings(String userSmtpAddress, UserSettingName[] userSettingNames)
at Microsoft.Exchange.WebServices.Data.ExchangeService.GetAutodiscoverUrl(String emailAddress, ExchangeVersion requestedServerVersion, AutodiscoverRedirectionUrlValidationCallback validateRedirectionUrlCallback)
at Microsoft.Exchange.WebServices.Data.ExchangeService.AutodiscoverUrl(String emailAddress, AutodiscoverRedirectionUrlValidationCallback validateRedirectionUrlCallback)
at Mail2Bug.Email.EWS.EWSConnectionManger.ConnectToEWS(Credentials credentials, Boolean useConversationGuidOnly) in C:\Users\mapar\Desktop\MAIL2BUG\Mail_2_Bug_Repo\mail2bug\Mail2Bug\Email\EWS\EWSConnectionManger.cs:line 91
at Mail2Bug.Email.EWS.EWSConnectionManger.GetConnection(Credentials credentials, Boolean useConversationGuidOnly) in C:\Users\mapar\Desktop\MAIL2BUG\Mail_2_Bug_Repo\mail2bug\Mail2Bug\Email\EWS\EWSConnectionManger.cs:line 61
at Mail2Bug.Email.MailboxManagerFactory.CreateMailboxManager(EmailSettings emailSettings) in C:\Users\mapar\Desktop\MAIL2BUG\Mail_2_Bug_Repo\mail2bug\Mail2Bug\Email\MailboxManagerFactory.cs:line 31
at Mail2Bug.Mail2BugEngine..ctor(InstanceConfig configInstance, MailboxManagerFactory mailboxManagerFactory) in C:\Users\mapar\Desktop\MAIL2BUG\Mail_2_Bug_Repo\mail2bug\Mail2Bug\Mail2BugEngine.cs:line 31
at Mail2Bug.PersistentInstanceRunner..ctor(InstanceConfig instanceConfig, MailboxManagerFactory mailboxManagerFactory) in C:\Users\mapar\Desktop\MAIL2BUG\Mail_2_Bug_Repo\mail2bug\Mail2Bug\InstanceRunner.cs:line 21
at Mail2Bug.MainApp.InitInstances(IEnumerable`1 configs) in C:\Users\mapar\Desktop\MAIL2BUG\Mail_2_Bug_Repo\mail2bug\Mail2Bug\Main.cs:line 214
2017-05-29 14:53:48,971 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 0 ---------------
2017-05-29 14:53:49,989 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 1 ---------------
2017-05-29 14:53:50,997 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 2 ---------------

Error: TFS connection attempt failed. Not authorized to access VSO collection: One or more errors -System.IO.FileLoadException

ERROR:
You are not authorized to access VSO Collection---> System.AggregateException: One or more errors occurred. ---> System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.

It displayed similar error on the first build. After installing latest version 8.0.3 and re-building the solution, it still displayed the same error in log files but not in the error list.

What is the key problem here? I even tried accessing VSO with account used-it is accessible.
Why does it specify the same version error again?
Please provide a solution for the same issue.

Suggestion: Support deployment as an Azure Web/Worker Role (or WebApp) with Web based config interface

It seems deploying this to a VM means one is dependent on the VM to be running for the processing to work as expected. It would be great should anyone when to evolve this useful utility to have the boilerplate code in place to allow it to be easily deployed into he Azure environment ?

This can then utilize some of the High Availability PaaS components to ensure it always running.

An HTML/Web based config screen would also be a nice feature, leveraging Azure AD or similar for admin credentials.

BUG - Access in TFS with 365 account that doesn`t have project level information and work item create permissions

Hello,

For my project http://che-tfsblssapp1.brooks.com:8080/tfs/CCS, with the email account [email protected] that is not in my TFS Team Project, it succeeds to create new WITs (Issue), because like that I have defined for my project. The service is proceding with 200 iteration and after that it stops.

Below is the error log:

D:\Service>Mail2Bug.exe
2017-02-06 10:59:48,344 [1] INFO Mail2Bug.MainApp [(null)] - Initializing engine for instance 'CCS' (Persistent? True)
2017-02-06 10:59:48,366 [1] INFO Mail2Bug.Mail2BugEngine [(null)] - Initalizing MailboxManager
2017-02-06 10:59:48,374 [1] INFO Mail2Bug.Helpers.DPAPIHelper [(null)] - Reading encrypted data from file .\Resources\password.bin
2017-02-06 10:59:48,382 [1] INFO Mail2Bug.Email.EWS.EWSConnectionManger [(null)] - Creating FolderMailboxManager for ([email protected], [email protected], 2038550685, False)
2017-02-06 10:59:50,864 [1] INFO Mail2Bug.Mail2BugEngine [(null)] - Initializing WorkItemManager
2017-02-06 10:59:50,870 [1] INFO Mail2Bug.MainApp [(null)] - Finished initialization of engine for instance 'CCS'
2017-02-06 10:59:50,876 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 0 ---------------
2017-02-06 10:59:50,882 [1] INFO Mail2Bug.Email.EWS.EWSConnectionManger [(null)] - Processing inbox for connection ([email protected], [email protected], 2038550685, False)
2017-02-06 10:59:50,888 [1] INFO Mail2Bug.Email.EWS.RecipientsMailboxManagerRouter [(null)] - Processing inbox for RecipientsMailboxManagerRouter
2017-02-06 10:59:51,358 [1] INFO Mail2Bug.Email.EWS.RecipientsMailboxManagerRouter [(null)] - Adding message to client queue: Client ID 100; subject: Test Bug2mail
2017-02-06 10:59:51,366 [1] INFO Mail2Bug.Email.EWS.RecipientsMailboxManagerRouter [(null)] - Finished processing inbox for RecipientsMailboxManagerRouter
2017-02-06 10:59:51,375 [8] INFO Mail2Bug.Mail2BugEngine [(null)] - Running for config instance 'CCS'
2017-02-06 10:59:51,383 [8] INFO Mail2Bug.Mail2BugEngine [(null)] - Found 1 messages for Instance CCS. Processing...
2017-02-06 10:59:51,389 [8] INFO Mail2Bug.Mail2BugEngine [(null)] - Processing message Test Bug2mail
2017-02-06 10:59:51,396 [8] INFO Mail2Bug.Mail2BugEngine [(null)] - Working in standard mode, using TFSWorkItemManager
2017-02-06 10:59:51,687 [8] INFO Mail2Bug.WorkItemManagement.TFSWorkItemManager [(null)] - Connecting to TFS http://che-tfsblssapp1.brooks.com:8080/tfs/CCS using Microsoft.TeamFoundation.Client.TfsClientCredentials credentials
2017-02-06 10:59:52,299 [8] WARN Mail2Bug.WorkItemManagement.TFSWorkItemManager [(null)] - TFS connection attempt failed.
Exception: Microsoft.TeamFoundation.TeamFoundationServerUnauthorizedException: TF30063: You are not authorized to access che-tfsblssapp1.brooks.com\CCS.
at Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.EnsureTokenProvider(HttpWebResponse webResponse)
at Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.SendRequest()
at Microsoft.TeamFoundation.Client.Channels.TfsHttpRequestChannel.Request(TfsMessage message, TimeSpan timeout)
at Microsoft.TeamFoundation.Client.Channels.TfsHttpClientBase.Invoke(TfsClientOperation operation, Object[] parameters, TimeSpan timeout, Object[]& outputs)
at Microsoft.TeamFoundation.Framework.Client.LocationWebService.Connect(Int32 connectOptions, Int32 lastChangeId, Int32 features)
at Microsoft.TeamFoundation.Framework.Client.FrameworkServerDataProvider.Connect(ConnectOptions connectOptions)
at Microsoft.TeamFoundation.Framework.Client.FrameworkServerDataProvider.EnsureConnected(ConnectOptions optionsNeeded)
at Microsoft.TeamFoundation.Framework.Client.FrameworkServerDataProvider.EnsureAuthenticated()
at Microsoft.TeamFoundation.Client.TfsConnection.EnsureAuthenticated()
at Mail2Bug.WorkItemManagement.TFSWorkItemManager.ConnectToTfsCollection() in D:\Projects\Mail2Bug\Mail2Bug\WorkItemManagement\TFSWorkItemManager.cs:line 61
2017-02-06 10:59:52,360 [8] INFO Mail2Bug.WorkItemManagement.TFSWorkItemManager [(null)] - Connecting to TFS http://che-tfsblssapp1.brooks.com:8080/tfs/CCS using Microsoft.TeamFoundation.Client.TfsClientCredentials credentials
2017-02-06 10:59:53,359 [8] INFO Mail2Bug.WorkItemManagement.TFSWorkItemManager [(null)] - Successfully connected to TFS
2017-02-06 10:59:53,366 [8] INFO Mail2Bug.WorkItemManagement.TFSWorkItemManager [(null)] - Connected to TFS. Getting TFS WorkItemStore
2017-02-06 10:59:55,552 [8] INFO Mail2Bug.WorkItemManagement.TFSWorkItemManager [(null)] - Geting TFS Project
2017-02-06 10:59:55,569 [8] INFO Mail2Bug.WorkItemManagement.TFSWorkItemManager [(null)] - Initializing WorkItems Cache
2017-02-06 10:59:55,576 [8] INFO Mail2Bug.WorkItemManagement.TFSWorkItemManager [(null)] - Initializing work items cache
2017-02-06 10:59:57,338 [8] INFO Mail2Bug.WorkItemManagement.TFSWorkItemManager [(null)] - 0 items retrieved by TFS cache query
2017-02-06 10:59:57,374 [8] INFO Mail2Bug.Mail2BugEngine [(null)] - Initializing MessageProcessingStrategy
2017-02-06 10:59:57,388 [8] INFO Mail2Bug.MessageProcessingStrategies.NameResolver [(null)] - Resolving name for alias/name Marius.Golban/Golban, Marius (Consultant)
2017-02-06 10:59:57,395 [8] INFO Mail2Bug.MessageProcessingStrategies.SpecialValueResolver [(null)] - Alias 'Marius.Golban', resolved to Golban, Marius (Consultant)
2017-02-06 10:59:57,442 [8] WARN Mail2Bug.WorkItemManagement.TFSWorkItemManager [(null)] - 'Unassigned' is an invalid value for Assigned To. Trying to find approximate value.
2017-02-06 10:59:57,452 [8] INFO Mail2Bug.WorkItemManagement.TFSWorkItemManager [(null)] - Approximate value is
2017-02-06 10:59:57,461 [8] ERROR Mail2Bug.WorkItemManagement.TFSWorkItemManager [(null)] - Exception caught while trying to set value of field 'Priority Path'
Microsoft.TeamFoundation.WorkItemTracking.Client.FieldDefinitionNotExistException: TF26027: A field definition Priority Path in the work item type definition file does not exist. Add a definition for this field or remove the reference to the field and try again.
at Microsoft.TeamFoundation.WorkItemTracking.Client.FieldDefinitionCollection.get_Item(String name)
at Microsoft.TeamFoundation.WorkItemTracking.Client.FieldCollection.get_Item(String name)
at Mail2Bug.WorkItemManagement.TFSWorkItemManager.TryApplyFieldValue(WorkItem workItem, String key, String value) in D:\Projects\Mail2Bug\Mail2Bug\WorkItemManagement\TFSWorkItemManager.cs:line 411
2017-02-06 10:59:57,472 [8] WARN Mail2Bug.WorkItemManagement.TFSWorkItemManager [(null)] - 'Unassigned' is an invalid value for Assigned To. Trying to find approximate value.
2017-02-06 10:59:57,478 [8] INFO Mail2Bug.WorkItemManagement.TFSWorkItemManager [(null)] - Approximate value is
2017-02-06 11:00:04,961 [8] INFO Mail2Bug.MessageProcessingStrategies.SimpleBugStrategy [(null)] - Added new work item 22 for message with subject: Test Bug2mail (conversation index:01D2805731C101151F089A614AA1A5BDB613B53043E0)
2017-02-06 11:00:14,301 [8] INFO Mail2Bug.Mail2BugEngine [(null)] - Message 'Test Bug2mail' processed successfully, moving to next message
2017-02-06 11:00:15,516 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 1 ---------------
2017-02-06 11:00:15,527 [1] INFO Mail2Bug.Email.EWS.EWSConnectionManger [(null)] - Processing inbox for connection ([email protected], [email protected], 2038550685, False)
2017-02-06 11:00:15,538 [1] INFO Mail2Bug.Email.EWS.RecipientsMailboxManagerRouter [(null)] - Processing inbox for RecipientsMailboxManagerRouter
2017-02-06 11:00:15,714 [1] INFO Mail2Bug.Email.EWS.RecipientsMailboxManagerRouter [(null)] - Finished processing inbox for RecipientsMailboxManagerRouter
2017-02-06 11:00:15,725 [8] INFO Mail2Bug.Mail2BugEngine [(null)] - Running for config instance 'CCS'
2017-02-06 11:00:16,736 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 2 ---------------
2017-02-06 11:00:16,746 [1] INFO Mail2Bug.Email.EWS.EWSConnectionManger [(null)] - Processing inbox for connection ([email protected], [email protected], 2038550685, False)
2017-02-06 11:00:16,756 [1] INFO Mail2Bug.Email.EWS.RecipientsMailboxManagerRouter [(null)] - Processing inbox for RecipientsMailboxManagerRouter
2017-02-06 11:00:16,933 [1] INFO Mail2Bug.Email.EWS.RecipientsMailboxManagerRouter [(null)] - Finished processing inbox for RecipientsMailboxManagerRouter
2017-02-06 11:00:16,940 [10] INFO Mail2Bug.Mail2BugEngine [(null)] - Running for config instance 'CCS'
2017-02-06 11:00:17,947 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 3 ---------------
2017-02-06 11:00:17,952 [1] INFO Mail2Bug.Email.EWS.EWSConnectionManger [(null)] - Processing inbox for connection ([email protected], [email protected], 2038550685, False)
2017-02-06 11:00:17,956 [1] INFO Mail2Bug.Email.EWS.RecipientsMailboxManagerRouter [(null)] - Processing inbox for RecipientsMailboxManagerRouter
2017-02-06 11:00:18,138 [1] INFO Mail2Bug.Email.EWS.RecipientsMailboxManagerRouter [(null)] - Finished processing inbox for RecipientsMailboxManagerRouter
2017-02-06 11:00:18,148 [8] INFO Mail2Bug.Mail2BugEngine [(null)] - Running for config instance 'CCS'
2017-02-06 11:00:19,165 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 4 ---------------
2017-02-06 11:00:19,177 [1] INFO Mail2Bug.Email.EWS.EWSConnectionManger [(null)] - Processing inbox for connection ([email protected], [email protected], 2038550685, False)
2017-02-06 11:00:19,191 [1] INFO Mail2Bug.Email.EWS.RecipientsMailboxManagerRouter [(null)] - Processing inbox for RecipientsMailboxManagerRouter
2017-02-06 11:00:19,407 [1] INFO Mail2Bug.Email.EWS.RecipientsMailboxManagerRouter [(null)] - Finished processing inbox for RecipientsMailboxManagerRouter
2017-02-06 11:00:19,427 [10] INFO Mail2Bug.Mail2BugEngine [(null)] - Running for config instance 'CCS'
2017-02-06 11:00:20,440 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 5 ---------------
2017-02-06 11:00:20,450 [1] INFO Mail2Bug.Email.EWS.EWSConnectionManger [(null)] - Processing inbox for connection ([email protected], [email protected], 2038550685, False)
2017-02-06 11:00:20,462 [1] INFO Mail2Bug.Email.EWS.RecipientsMailboxManagerRouter [(null)] - Processing inbox for RecipientsMailboxManagerRouter
2017-02-06 11:00:20,648 [1] INFO Mail2Bug.Email.EWS.RecipientsMailboxManagerRouter [(null)] - Finished processing inbox for RecipientsMailboxManagerRouter
2017-02-06 11:00:20,659 [8] INFO Mail2Bug.Mail2BugEngine [(null)] - Running for config instance 'CCS'
2017-02-06 11:00:21,680 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 6 ---------------
2017-02-06 11:00:21,692 [1] INFO Mail2Bug.Email.EWS.EWSConnectionManger [(null)] - Processing inbox for connection ([email protected], [email protected], 2038550685, False)
2017-02-06 11:00:21,701 [1] INFO Mail2Bug.Email.EWS.RecipientsMailboxManagerRouter [(null)] - Processing inbox for RecipientsMailboxManagerRouter
2017-02-06 11:00:21,885 [1] INFO Mail2Bug.Email.EWS.RecipientsMailboxManagerRouter [(null)] - Finished processing inbox for RecipientsMailboxManagerRouter
2017-02-06 11:00:21,897 [10] INFO Mail2Bug.Mail2BugEngine [(null)] - Running for config instance 'CCS'
2017-02-06 11:00:22,910 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 7 ---------------
2017-02-06 11:00:22,929 [1] INFO Mail2Bug.Email.EWS.EWSConnectionManger [(null)] - Processing inbox for connection ([email protected], [email protected], 2038550685, False)
2017-02-06 11:00:22,943 [1] INFO Mail2Bug.Email.EWS.RecipientsMailboxManagerRouter [(null)] - Processing inbox for RecipientsMailboxManagerRouter
2017-02-06 11:00:23,119 [1] INFO Mail2Bug.Email.EWS.RecipientsMailboxManagerRouter [(null)] - Finished processing inbox for RecipientsMailboxManagerRouter
2017-02-06 11:00:23,131 [8] INFO Mail2Bug.Mail2BugEngine [(null)] - Running for config instance 'CCS'
2017-02-06 11:00:24,143 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 8 ---------------
2017-02-06 11:00:24,154 [1] INFO Mail2Bug.Email.EWS.EWSConnectionManger [(null)] - Processing inbox for connection ([email protected], [email protected], 2038550685, False)
2017-02-06 11:00:24,166 [1] INFO Mail2Bug.Email.EWS.RecipientsMailboxManagerRouter [(null)] - Processing inbox for RecipientsMailboxManagerRouter
2017-02-06 11:00:24,346 [1] INFO Mail2Bug.Email.EWS.RecipientsMailboxManagerRouter [(null)] - Finished processing inbox for RecipientsMailboxManagerRouter
2017-02-06 11:00:24,358 [10] INFO Mail2Bug.Mail2BugEngine [(null)] - Running for config instance 'CCS'
2017-02-06 11:00:25,370 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 9 ---------------
2017-02-06 11:00:25,383 [1] INFO Mail2Bug.Email.EWS.EWSConnectionManger [(null)] - Processing inbox for connection ([email protected], [email protected], 2038550685, False)
2017-02-06 11:00:25,395 [1] INFO Mail2Bug.Email.EWS.RecipientsMailboxManagerRouter [(null)] - Processing inbox for RecipientsMailboxManagerRouter
2017-02-06 11:00:25,584 [1] INFO Mail2Bug.Email.EWS.RecipientsMailboxManagerRouter [(null)] - Finished processing inbox for RecipientsMailboxManagerRouter
2017-02-06 11:00:25,597 [8] INFO Mail2Bug.Mail2BugEngine [(null)] - Running for config instance 'CCS'
2017-02-06 11:00:26,609 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 10 ---------------
2017-02-06 11:00:26,621 [1] INFO Mail2Bug.Email.EWS.EWSConnectionManger [(null)] - Processing inbox for connection ([email protected], [email protected], 2038550685, False)
2017-02-06 11:00:26,633 [1] INFO Mail2Bug.Email.EWS.RecipientsMailboxManagerRouter [(null)] - Processing inbox for RecipientsMailboxManagerRouter
2017-02-06 11:00:27,082 [1] INFO Mail2Bug.Email.EWS.RecipientsMailboxManagerRouter [(null)] - Adding message to client queue: Client ID 100; subject: RE: Test Bug2mail
2017-02-06 11:00:27,094 [1] INFO Mail2Bug.Email.EWS.RecipientsMailboxManagerRouter [(null)] - Finished processing inbox for RecipientsMailboxManagerRouter
2017-02-06 11:00:27,103 [10] INFO Mail2Bug.Mail2BugEngine [(null)] - Running for config instance 'CCS'
2017-02-06 11:00:27,112 [10] INFO Mail2Bug.Mail2BugEngine [(null)] - Found 1 messages for Instance CCS. Processing...
2017-02-06 11:00:27,120 [10] INFO Mail2Bug.Mail2BugEngine [(null)] - Processing message RE: Test Bug2mail
2017-02-06 11:00:27,130 [10] INFO Mail2Bug.MessageProcessingStrategies.SimpleBugStrategy [(null)] - Modifying work item 22 subject: RE: Test Bug2mail
2017-02-06 11:00:27,135 [10] INFO Mail2Bug.MessageProcessingStrategies.NameResolver [(null)] - Resolving name for alias/name ccstestsw/CCS Support Test
2017-02-06 11:00:27,139 [10] WARN Mail2Bug.MessageProcessingStrategies.SpecialValueResolver [(null)] - Name resolution failed for sender alias 'ccstestsw'. Returning display name.
2017-02-06 11:00:27,313 [10] WARN Mail2Bug.WorkItemManagement.TFSWorkItemManager [(null)] - 'CCS Support Test' is an invalid value for Changed By. Trying to find approximate value.
2017-02-06 11:00:27,322 [10] INFO Mail2Bug.WorkItemManagement.TFSWorkItemManager [(null)] - Approximate value is
2017-02-06 11:00:40,468 [10] ERROR Mail2Bug.Mail2BugEngine [(null)] - Error processing message
Microsoft.TeamFoundation.WorkItemTracking.Client.UnexpectedErrorException: There is a problem on the server. Contact your Team Foundation Server administrator. ---> System.Web.Services.Protocols.SoapException: Object reference not set to an instance of an object.
at Microsoft.TeamFoundation.WorkItemTracking.Proxy.RetryHandler.HandleSoapException(SoapException se)
at Microsoft.TeamFoundation.WorkItemTracking.Proxy.WorkItemServer.Update(String requestId, XmlElement package, XmlElement& result, MetadataTableHaveEntry[] metadataHave, String& dbStamp, IMetadataRowSets& metadata)
at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.SendUpdatePackage(XmlElement package, XmlElement& result, Boolean bulk)
--- End of inner exception stack trace ---
at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.SendUpdatePackage(XmlElement package, XmlElement& result, Boolean bulk)
at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.SaveWorkItems(WorkItem[] workitems, Boolean bulk, SaveFlags saveFlags)
at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem.Save(SaveFlags saveFlags)
at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem.Save()
at Mail2Bug.WorkItemManagement.TFSWorkItemManager.ValidateAndSaveWorkItem(WorkItem workItem) in D:\Projects\Mail2Bug\Mail2Bug\WorkItemManagement\TFSWorkItemManager.cs:line 390
at Mail2Bug.WorkItemManagement.TFSWorkItemManager.ModifyWorkItem(Int32 workItemId, String comment, Dictionary`2 values) in D:\Projects\Mail2Bug\Mail2Bug\WorkItemManagement\TFSWorkItemManager.cs:line 304
at Mail2Bug.MessageProcessingStrategies.SimpleBugStrategy.UpdateWorkItem(IIncomingEmailMessage message, Int32 workItemId) in D:\Projects\Mail2Bug\Mail2Bug\MessageProcessingStrategies\SimpleBugStrategy.cs:line 150
at Mail2Bug.MessageProcessingStrategies.SimpleBugStrategy.ProcessInboxMessage(IIncomingEmailMessage message) in D:\Projects\Mail2Bug\Mail2Bug\MessageProcessingStrategies\SimpleBugStrategy.cs:line 44
at Mail2Bug.Mail2BugEngine.ProcessInboxInternal() in D:\Projects\Mail2Bug\Mail2Bug\Mail2BugEngine.cs:line 79

Preserving formatting in work item

Hi again,

I was wondering if there was a way to preserve formatting from the email so it carries over to the work item associated with it. Any help would be appreciated.

Thanks!

Adapt regular expression for appending mails to existing work items

In the configuration file we find:
.*(bug|work item)\s*#*\s*(?&lt;id&gt;\d+)
!!!(bug|work item)\s*#*\s*(?&lt;id&gt;\d+)

This regular expression will give a problem if user uses the keyword 'bug' and a digit.
In my case users where testing the module and one had sent an email with the subject: "Test for bug 1"
Result, his mail was appended to the work item 1.
Better we should use the convention like used in Bugzilla: if prefix '#' then it will be interpreted as keyword. Example : 'bug #1' --> this means really append to work item 1

Change regular expression to:
.*(bug|work item)\s*#\s*(?&lt;id&gt;\d+)
!!!(bug|work item)\s*#\s*(?&lt;id&gt;\d+)

Just an idea to improve the usability...

Suggest remove SimpleWebTokenCredential

TFSWorkItemManager.GetServiceIdentityCredentials adds both SimpleWebTokenCredential and WindowsCredential (containing NetworkCredential) to the list of credentials to try for authentication.

The second one correctly authenticates the service identity. However, the first one seems to ignore the provided credentials and uses the cookie of the logged in windows user or prompts for login if not available.

This isn't desired behavior, In my case, I had inadvertently logged in to VSO as a different user when I was prompted for windows credentials the first time, and thereafter couldn't figure out why bugs were being created from the wrong user account.

To fix, I have removed the SimpleWebTokenCredential from GetServiceIdentityCredentials. If my assessment is correct, please let me know if you prefer to have this fixed via a pull request.

Submitting Bugs vs Report out of Bugs

This is not really an issue so much as a clarification of capabilities.

Do tickets submitted to via email require that the user have a valid account on our exchange or can anyone who uses the email address associated with Mail2Bug submit/update a ticket?

Is there an ability to have approved list on external emails that can update tickets?

It appears that Mail2Bug is the user that actually updates tickets, but does it record in the TFS history the user that sent the mail that triggered the item creation or update?

Can Mail2Bug be used to assign issues to users beyond the visibility of our TFS? IE - our TFS install is coupled to our Domain/Exchange system, but we have a partner company outside that develops products for us that does not have network access to our TFS instance, can Mail2Bug be used to forward the content of issues created? How would we configure it to do so?

Also - regarding this issue - is there a list serve for this project to have such discussions that are not really issues?

Thanks much,
DG

Query File Setup

In the basic setup it for the CacheQueryFile node in the configuration file it says to just create the file in Visual Studio. Could you give me more in depth steps on how to do that? Thank you.

RTF format support

Currently, an RTF-format email gets downgraded to plain text when the work item is created. It would be nice for this to be converted to HTML instead.

(401) Unauthorized. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.

I am getting un authorised access. Can someone help?

2017-06-01 14:27:23,237 [1] INFO Mail2Bug.MainApp [(null)] - Initializing engine for instance 'STCI CUSTOMER DSAT' (Persistent? True)
2017-06-01 14:27:23,263 [1] INFO Mail2Bug.Mail2BugEngine [(null)] - Initalizing MailboxManager
2017-06-01 14:27:23,273 [1] INFO Mail2Bug.Helpers.DPAPIHelper [(null)] - Reading encrypted data from file .\Resources\mail2bug.bin
2017-06-01 14:27:23,279 [1] INFO Mail2Bug.Email.EWS.EWSConnectionManger [(null)] - Creating FolderMailboxManager for ([email protected], [email protected], -485684100, False)
2017-06-01 14:27:44,463 [1] ERROR Mail2Bug.MainApp [(null)] - Exception while initializing instance 'STCI CUSTOMER DSAT'
Microsoft.Exchange.WebServices.Data.ServiceRequestException: The request failed. The remote server returned an error: (401) Unauthorized. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(HttpWebRequest request)
--- End of inner exception stack trace ---
at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(HttpWebRequest request)
at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ValidateAndEmitRequest(HttpWebRequest& request)
at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest1.Execute() at Microsoft.Exchange.WebServices.Data.ExchangeService.BindToFolder(FolderId folderId, PropertySet propertySet) at Microsoft.Exchange.WebServices.Data.ExchangeService.BindToFolder[TFolder](FolderId folderId, PropertySet propertySet) at Microsoft.Exchange.WebServices.Data.Folder.Bind(ExchangeService service, WellKnownFolderName name) at Mail2Bug.Email.EWS.EWSConnectionManger.ConnectToEWS(Credentials credentials, Boolean useConversationGuidOnly) in C:\Users\mapar\Desktop\MAIL2BUG\Mail_2_Bug_Repo\mail2bug\Mail2Bug\Email\EWS\EWSConnectionManger.cs:line 102 at Mail2Bug.Email.EWS.EWSConnectionManger.GetConnection(Credentials credentials, Boolean useConversationGuidOnly) in C:\Users\mapar\Desktop\MAIL2BUG\Mail_2_Bug_Repo\mail2bug\Mail2Bug\Email\EWS\EWSConnectionManger.cs:line 61 at Mail2Bug.Email.MailboxManagerFactory.CreateMailboxManager(EmailSettings emailSettings) in C:\Users\mapar\Desktop\MAIL2BUG\Mail_2_Bug_Repo\mail2bug\Mail2Bug\Email\MailboxManagerFactory.cs:line 31 at Mail2Bug.Mail2BugEngine..ctor(InstanceConfig configInstance, MailboxManagerFactory mailboxManagerFactory) in C:\Users\mapar\Desktop\MAIL2BUG\Mail_2_Bug_Repo\mail2bug\Mail2Bug\Mail2BugEngine.cs:line 31 at Mail2Bug.PersistentInstanceRunner..ctor(InstanceConfig instanceConfig, MailboxManagerFactory mailboxManagerFactory) in C:\Users\mapar\Desktop\MAIL2BUG\Mail_2_Bug_Repo\mail2bug\Mail2Bug\InstanceRunner.cs:line 21 at Mail2Bug.MainApp.InitInstances(IEnumerable1 configs) in C:\Users\mapar\Desktop\MAIL2BUG\Mail_2_Bug_Repo\mail2bug\Mail2Bug\Main.cs:line 214

Add support for updating items via email

Today, once a work item has been created, the only thing that is updated when a new email arrives is the comments section (with the latest message).
This item is for supporting updates to item fields in follow up emails via mnemonics and explicit overrides - if the latest message in the thread contains any mnemonics or explicit overrides, those settings should be reflected in the item.
This would enable support for "directives" via mnemonics - i.e. if the admin wants to support a "Resolve" directive that would resolve the issue, they can define a mnemonic for "Resolve" that sets the state to "Resolved".

This support should include a configuration setting to decide whether that feature is enabled or not.

No support for alias email addresses on an Exchange mailbox?

The current implementation doesn't support one exchange email box with different email aliases. (the aliases are then used in different instance configs to differentiate between for example bug mail or a requirement mail : for example [email protected] and [email protected])

The EWS web API will automatically translate the mail alias to the primary email owner of the email box. So when entering de mail2bug code, we know only the primary email address.
The same happens for the acknowledge reply email, it will always be sent from the primary email address.

For the first problem we can use the Transport Message Headers to detect ourselves the email alias used. See http://social.technet.microsoft.com/Forums/en-au/exchangesvrdevelopment/thread/1e5bbde0-218e-466e-afcc-cb60bc2ba692

For the second problem the standard EWS reply should not be used (EmailMessage Reply method).
I changed the code to use the standard NET SmtpClient code to send an email.
(That incorporates the use of the !!!bug #xxxx keyword in the reply html, because smtp don't use the 'conversation' model of Exchange!)

If requested, I can send the changed code as pull request.

Regards,

Error when running scheduled task

I configured everything properly to the point where the test shows me that there were no errors. So when I submit an email to the assigned address, wait for the job to run, and it's successful. I then see in the logs:

2016-12-08 17:06:46,969 [1] ERROR Mail2Bug.MainApp [(null)] - Exception caught in main - aborting. System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Windows\system32\Resources'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileSystemEnumerableIterator1.CommonInit() at System.IO.FileSystemEnumerableIterator1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
at System.IO.Directory.GetFiles(String path, String searchPattern)
at Mail2Bug.MainApp.Main(String[] args) in C:\TFS\costartfs\Scm\mail2bug-master\Mail2Bug\Main.cs:line 36

Not sure where to go from here. Server has VS2013 & 2015, Also has all other requirements. Not sure where else to look.

Add support for using any work-item field in the ack email

Currently, only the bug ID and collection URI are supported as placeholders in the ack email. We should support referencing any work-item field in the ack email template, and have it replaced with the actual field value during runtime.
This can be achieved by wrapping the work-item in a key-value pair retrieval interface and providing that to the AckEmailHandler.

Support the ability to supply a regex or logic to determine whether to reply to an e-mail address

There are scenarios in which a DL or recipient may be able to accept e-mails from externals, but may not want to auto-reply with deep links into bug systems.

A feature here to help with the scenario might be one of the following options:

  • Add logic or regex to decide whether to process or ignore based on who sent a message
  • Add logic or regex to decide whether to send the ack email based on who sent

Finding Folder on a shared mailbox is not working

I am trying to use a shared mail box, and trying to get the configuration to work with <ServiceType>EWSByFolder</ServiceType> and <IncomingFolder>incoming</IncomingFolder>, <CompletedFolder>Processed</CompletedFolder> and <ErrorFolder>Error</ErrorFolder>

From what I can diagnose from the code, the FolderNameResolver currency seem to be looking in the user credentials own inbox as defied by the config <EWSUsername/> and not the inbox of the <EWSMailboxAddress>?

I added the folders to the <EWSUsername> and it works as expected, but not the desired functionality.

I am unfamiliar with the EWS API and google is not being very helpful, any help greatly appreciated.

Mail2Bug accesses EWSUsername mailbox instead of EWSMailboxAddress

I've followed the installation guide and made the necessary changes to the config file.
However, when I run Mail2Bug, it processes mails in the personal mailbox connected to the account credentials supplied by EWSUsername and EWSPasswordFile. It neglects to check the mailbox explicitly specified by EWSMailboxAddress.

Despite the fact that it checks the wrong inbox, it does still follow the other instructions laid out (for example, it won't create tickets for mails unless they've got a valid recipient in the To: or CC: fields).

I have verified that the EWS Account credentials definitely have access to the MailboxAddress, so I don't think that this is the issue. I have also tested this with other accounts - each time, Mail2Bug only accesses the Mailbox that the credentials are directly connected to.

Any ideas/suggestions to resolve this would be much appreciated!

inline images in an html mailbody are not retained as inline in the tfs workitem

For the moment the inline images in a html mailbody are saved as a normal attachment in the created tfs workitem, not as an inline attachment.

I've found an article with the base for a solution, but it will take more time to implement this, more time that I have for the moment.
For those who are interested: http://roadtoalm.com/2014/12/31/insert-an-inline-image-into-a-work-item-with-the-tfs-api/

Anyway, thanks already for creating this helpfull plugin!

So close I can hear a heart beat...I think

I have followed the install guide, and the problem I am having is that the program is not picking up or creating new task with new email that is in the folder. Below is what I get when I run the test.

PS D:\mail2bug-master\SFTMail2Bug> .\Mail2Bug.exe
2015-06-30 11:10:28,642 [1] INFO Mail2Bug.MainApp [(null)] - Initializing engine for instance 'MSCOMAppsSR'
2015-06-30 11:10:28,689 [1] INFO Mail2Bug.Mail2BugEngine [(null)] - Initalizing MailboxManager
2015-06-30 11:10:29,158 [1] INFO Mail2Bug.Helpers.DPAPIHelper [(null)] - Reading encrypted data from file .\Resources\password.bin
2015-06-30 11:10:29,220 [1] INFO Mail2Bug.Email.EWS.EWSConnectionFactory [(null)] - Creating FolderMailboxManager for ([email protected], [email protected], -500626
710)
2015-06-30 11:10:33,032 [1] INFO Mail2Bug.Mail2BugEngine [(null)] - Initializing WorkItemManager
2015-06-30 11:10:33,032 [1] INFO Mail2Bug.Mail2BugEngine [(null)] - Working in standard mode, using TFSWorkItemManager
2015-06-30 11:10:34,836 [1] INFO Mail2Bug.WorkItemManagement.TFSWorkItemManager [(null)] - Connecting to TFS https://microsoft.visualstudio.com/DefaultCollection/ using Micro
soft.TeamFoundation.Client.TfsClientCredentials credentials
2015-06-30 11:10:51,143 [1] INFO Mail2Bug.WorkItemManagement.TFSWorkItemManager [(null)] - Successfully connected to TFS
2015-06-30 11:10:51,143 [1] INFO Mail2Bug.WorkItemManagement.TFSWorkItemManager [(null)] - Connected to TFS. Getting TFS WorkItemStore
2015-06-30 11:11:39,388 [1] INFO Mail2Bug.WorkItemManagement.TFSWorkItemManager [(null)] - Geting TFS Project
2015-06-30 11:11:39,404 [1] INFO Mail2Bug.WorkItemManagement.TFSWorkItemManager [(null)] - Initializing WorkItems Cache
2015-06-30 11:11:39,435 [1] INFO Mail2Bug.WorkItemManagement.TFSWorkItemManager [(null)] - Initializing work items cache
2015-06-30 11:11:40,064 [1] INFO Mail2Bug.WorkItemManagement.TFSWorkItemManager [(null)] - 0 items retrieved by TFS cache query
2015-06-30 11:11:42,392 [1] INFO Mail2Bug.Mail2BugEngine [(null)] - Initializing MessageProcessingStrategy
2015-06-30 11:11:42,392 [1] INFO Mail2Bug.MainApp [(null)] - Finished initialization of engine for instance 'MSCOMAppsSR'
2015-06-30 11:11:42,407 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 0 ---------------
2015-06-30 11:11:42,407 [3] INFO Mail2Bug.Mail2BugEngine [(null)] - Running for config instance 'MSCOMAppsSR'
2015-06-30 11:11:42,438 [3] INFO Mail2Bug.Mail2BugEngine [(null)] - Reading messages from inbox ()
2015-06-30 11:11:42,923 [3] INFO Mail2Bug.Mail2BugEngine [(null)] - No messages found for instance MSCOMAppsSR
2015-06-30 11:11:43,986 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 1 ---------------
2015-06-30 11:11:43,986 [3] INFO Mail2Bug.Mail2BugEngine [(null)] - Running for config instance 'MSCOMAppsSR'
2015-06-30 11:11:43,986 [3] INFO Mail2Bug.Mail2BugEngine [(null)] - Reading messages from inbox ()
2015-06-30 11:11:44,346 [3] INFO Mail2Bug.Mail2BugEngine [(null)] - No messages found for instance MSCOMAppsSR
2015-06-30 11:11:45,361 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 2 ---------------
2015-06-30 11:11:45,361 [3] INFO Mail2Bug.Mail2BugEngine [(null)] - Running for config instance 'MSCOMAppsSR'
2015-06-30 11:11:45,361 [3] INFO Mail2Bug.Mail2BugEngine [(null)] - Reading messages from inbox ()
2015-06-30 11:11:45,690 [3] INFO Mail2Bug.Mail2BugEngine [(null)] - No messages found for instance MSCOMAppsSR
2015-06-30 11:11:46,692 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 3 ---------------
2015-06-30 11:11:46,692 [3] INFO Mail2Bug.Mail2BugEngine [(null)] - Running for config instance 'MSCOMAppsSR'
2015-06-30 11:11:46,692 [3] INFO Mail2Bug.Mail2BugEngine [(null)] - Reading messages from inbox ()
2015-06-30 11:11:47,020 [3] INFO Mail2Bug.Mail2BugEngine [(null)] - No messages found for instance MSCOMAppsSR
PS D:\mail2bug-master\SFTMail2Bug>

Instances failed to initialize do not retry

If there is a failure in instance initialization, Mail2Bug doesn't retry to re-init an instance and keeps iterating without processing that instance. This causes delays for that instance.

As an example of a failure we had some issue with Exchange Autodiscover service. This instance processing was delayed until we ran through all iterations and restarted mail2bug.exe process.

2016-09-27 14:28:40,820 [1] INFO Mail2Bug.Email.EWS.EWSConnectionManger [(null)] - Creating FolderMailboxManager for ([email protected], [email protected], 531558670, False)
2016-09-27 14:28:43,813 [1] ERROR Mail2Bug.MainApp [(null)] - Exception while initializing instance 'Git2Bug'
Microsoft.Exchange.WebServices.Data.AutodiscoverLocalException: The Autodiscover service couldn't be located.
at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.InternalGetLegacyUserSettings[TSettings](String emailAddress, List1 redirectionEmailAddresses, Int32& currentHop) at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.GetLegacyUserSettings[TSettings](String emailAddress) at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.InternalGetLegacyUserSettings(String emailAddress, List1 requestedSettings)
at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.GetUserSettings(String userSmtpAddress, UserSettingName[] userSettingNames)
at Microsoft.Exchange.WebServices.Data.ExchangeService.GetAutodiscoverUrl(String emailAddress, ExchangeVersion requestedServerVersion, AutodiscoverRedirectionUrlValidationCallback validateRedirectionUrlCallback)
at Microsoft.Exchange.WebServices.Data.ExchangeService.AutodiscoverUrl(String emailAddress, AutodiscoverRedirectionUrlValidationCallback validateRedirectionUrlCallback)
at Mail2Bug.Email.EWS.EWSConnectionManger.ConnectToEWS(Credentials credentials, Boolean useConversationGuidOnly) in D:\GitRepos\Mail2Bug\mail2bug\Mail2Bug\Email\EWS\EWSConnectionManger.cs:line 91
at Mail2Bug.Email.EWS.EWSConnectionManger.GetConnection(Credentials credentials, Boolean useConversationGuidOnly) in D:\GitRepos\Mail2Bug\mail2bug\Mail2Bug\Email\EWS\EWSConnectionManger.cs:line 61
at Mail2Bug.Email.MailboxManagerFactory.CreateMailboxManager(EmailSettings emailSettings) in D:\GitRepos\Mail2Bug\mail2bug\Mail2Bug\Email\MailboxManagerFactory.cs:line 29
at Mail2Bug.Mail2BugEngine..ctor(InstanceConfig configInstance, MailboxManagerFactory mailboxManagerFactory) in D:\GitRepos\Mail2Bug\mail2bug\Mail2Bug\Mail2BugEngine.cs:line 31
at Mail2Bug.PersistentInstanceRunner..ctor(InstanceConfig instanceConfig, MailboxManagerFactory mailboxManagerFactory) in D:\GitRepos\Mail2Bug\mail2bug\Mail2Bug\InstanceRunner.cs:line 21
at Mail2Bug.MainApp.InitInstances(IEnumerable`1 configs) in D:\GitRepos\Mail2Bug\mail2bug\Mail2Bug\Main.cs:line 214

Does M2B support Key value pairs?

I'm trying to use M2B as a gateway to get issues that were pushed to ServiceNow into TFS. We use SN as our ticketing system. If I have a user that opens a ticket in SN and it's determined to be a bug in one of our applications I want to trigger and email from SN to TFS, and in that Email supply the data needed to open a Bug in TFS.

I see that we can do the basic stuff, The subject of the email is the "Title" of the bug, the message body can get stuffed into Repro Steps. But lets say that there is other data I want to populate into TFS, I want to know who reported it, the person that reported it may not be the sender... is there a way to do the following:

in the config file define Mnenonic="Symptom" Field="Symptom" Value="@@@Symptom"

Then in the body of the message of the if the users puts:
@@@Symptom: "This only happens the first time the application runs"
the M2B would take that string and put it on the Symptom filed?

Pat

It take aproximatly 1:45 for Mail to bug to start

I have a simple proof of concept demo of Mail2Bug working for the most part. The one thing that annoys me is that is take about 1:45 for M2B to kick in. We have O365 and I am logging in with an email address.
I'm not sure how to increase the logging level or how to open the project in VS to figure out what is going wrong. Here are the logs.
2017-05-31 13:44:01,996 [1] INFO Mail2Bug.MainApp [(null)] - Initializing engine for instance 'Mail2BugConfigMyInstanceName' (Persistent? True)
2017-05-31 13:44:02,043 [1] INFO Mail2Bug.Mail2BugEngine [(null)] - Initalizing MailboxManager
2017-05-31 13:44:02,089 [1] INFO Mail2Bug.Helpers.DPAPIHelper [(null)] - Reading encrypted data from file .\Resources\password.bin
2017-05-31 13:44:02,089 [1] INFO Mail2Bug.Email.EWS.EWSConnectionManger [(null)] - Creating FolderMailboxManager for ([email protected], [email protected], 1128924882, False)

<<<Here is where it sits for about 1:45, then it starts up>>>

2017-05-31 13:45:46,480 [1] INFO Mail2Bug.Mail2BugEngine [(null)] - Initializing WorkItemManager
2017-05-31 13:45:46,480 [1] INFO Mail2Bug.MainApp [(null)] - Finished initialization of engine for instance 'Mail2BugConfigMyInstanceName'
2017-05-31 13:45:46,495 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 0 ---------------
2017-05-31 13:45:46,495 [1] INFO Mail2Bug.Email.EWS.EWSConnectionManger [(null)] - Processing inbox for connection ([email protected], [email protected], 1128924882, False)
2017-05-31 13:45:46,495 [1] INFO Mail2Bug.Email.EWS.RecipientsMailboxManagerRouter [(null)] - Processing inbox for RecipientsMailboxManagerRouter
2017-05-31 13:45:46,495 [1] INFO Mail2Bug.Email.EWS.RecipientsMailboxManagerRouter [(null)] - Finished processing inbox for RecipientsMailboxManagerRouter
2017-05-31 13:45:46,511 [9] INFO Mail2Bug.Mail2BugEngine [(null)] - Running for config instance 'Mail2BugConfigMyInstanceName'
2017-05-31 13:45:56,526 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 1 ---------------

NOTE: reposted to remove real email address

Monitor more email addresses

Would like to find out, can i setup multiple email addresses to be monitor in the organizations? Is it set at different instances in the config file? If yes, how to cater for the password.bin files?

Unexpected situation with 2 Mail2Bug aliases added at different times

When a different Mail2Bug e-mail alias is added to a thread that already had another Mail2Bug alias, could it do one of two things:

  1. Update the existing bug with the settings of the new Mail2Bug alias
  2. Open a new bug

We hit a situation where there was a long thread with Mail2Bug alias #1 that was added, created a bug, and then someone removed a bunch of addresses at some point, then I added Mail2Bug alias #2, and noticed it didn't actually create a new bug, or send me any notification. It did actually update the original bug (although because the original bug was closed, that accomplished nothing).

Html email loses his formatting

Hi,
You can use the ##RawMessageBody tag in the configuration file to put the the html aware mailbody into the tfs item.

But this is not working flawless because of following code in TFSWorkItemManager:

                if (field.FieldDefinition.FieldType == FieldType.Html)
                {
                    value = value.Replace("\n", "<br>");
                }

Replace this code by

                if (field.FieldDefinition.FieldType == FieldType.Html
                    && !value.StartsWith("<html"))  // don't replace \n in a value with real html content, it must not be interpreted!
                {
                    value = value.Replace("\n", "<br>");
                }

If requested, I can do a pull request.

Scheduled Task won't run when using VSO

I tried to get the Scheduled Task to run using a VSO project but unless I set the Scheduled Task to only run when user is logged in (and have the user logged in) will it auth to VSO. I suspect it has something to do with OAuth versus Windows Auth - has anyone else been able to get this to work?

Keyword activation?

Can this tool be configured to only process emails with specific keywords in them? Maybe also a keyword to help the tool determine what kind of work item to create... and a keyword to help the tool figure out which team project to create the work item in?

:)

Hello

Hello all,

I have configure my company TFS project for Bug2mail service.
The email account used is my company email, but, when the service starts I get error message : Could not establish trust relationship for the SSL/TLS secure channel. --->
I have modified on purpose in the logfile for: [email protected], domain\3mgolban, ************
I will attached the entire logfile, maybe someone has an idea.

Thanks
Marius Golban

Error_Bug2Mail.txt

The Autodiscover service couldn't be located.

I am trying to setup mail2bug for the first time. We are using office 365 and TFS 2015 update 3. I have configured everything. I can open up the account that I am using for mail2bug with outlook and I can see test emails that I sent in the inbox. When I start mail2bug, it looks like everything is ok. When I send an email to the account that is being monitored, after a bit I see the following in log file:

2017-04-19 07:32:18,317 [1] INFO Mail2Bug.MainApp [(null)] - Initializing engine for instance 'Mail2BugConfigMyInstanceName' (Persistent? True)
2017-04-19 07:32:18,364 [1] INFO Mail2Bug.Mail2BugEngine [(null)] - Initalizing MailboxManager
2017-04-19 07:32:18,379 [1] INFO Mail2Bug.Helpers.DPAPIHelper [(null)] - Reading encrypted data from file .\Resources\password.bin
2017-04-19 07:32:18,379 [1] INFO Mail2Bug.Email.EWS.EWSConnectionManger [(null)] - Creating FolderMailboxManager for ([email protected], CORP\tfsbuild1_svcacct, 1128924882, False)
2017-04-19 07:48:21,936 [1] INFO Mail2Bug.MainApp [(null)] - Initializing engine for instance 'Mail2BugConfigMyInstanceName' (Persistent? True)
2017-04-19 07:48:21,983 [1] INFO Mail2Bug.Mail2BugEngine [(null)] - Initalizing MailboxManager
2017-04-19 07:48:21,999 [1] INFO Mail2Bug.Helpers.DPAPIHelper [(null)] - Reading encrypted data from file .\Resources\password.bin
2017-04-19 07:48:21,999 [1] INFO Mail2Bug.Email.EWS.EWSConnectionManger [(null)] - Creating FolderMailboxManager for ([email protected], CORP\tfsbuild1_svcacct, 1128924882, False)
2017-04-19 07:53:27,753 [1] ERROR Mail2Bug.MainApp [(null)] - Exception while initializing instance 'Mail2BugConfigMyInstanceName'
Microsoft.Exchange.WebServices.Data.AutodiscoverLocalException: The Autodiscover service couldn't be located.
at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.InternalGetLegacyUserSettings[TSettings](String emailAddress, List1 redirectionEmailAddresses, Int32& currentHop) at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.GetLegacyUserSettings[TSettings](String emailAddress) at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.InternalGetLegacyUserSettings(String emailAddress, List1 requestedSettings)
at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.GetUserSettings(String userSmtpAddress, UserSettingName[] userSettingNames)
at Microsoft.Exchange.WebServices.Data.ExchangeService.GetAutodiscoverUrl(String emailAddress, ExchangeVersion requestedServerVersion, AutodiscoverRedirectionUrlValidationCallback validateRedirectionUrlCallback)
at Microsoft.Exchange.WebServices.Data.ExchangeService.AutodiscoverUrl(String emailAddress, AutodiscoverRedirectionUrlValidationCallback validateRedirectionUrlCallback)
at Mail2Bug.Email.EWS.EWSConnectionManger.ConnectToEWS(Credentials credentials, Boolean useConversationGuidOnly) in E:\Agent_work\4\s\Mail2Bug\Email\EWS\EWSConnectionManger.cs:line 91
at Mail2Bug.Email.EWS.EWSConnectionManger.GetConnection(Credentials credentials, Boolean useConversationGuidOnly) in E:\Agent_work\4\s\Mail2Bug\Email\EWS\EWSConnectionManger.cs:line 61
at Mail2Bug.Email.MailboxManagerFactory.CreateMailboxManager(EmailSettings emailSettings) in E:\Agent_work\4\s\Mail2Bug\Email\MailboxManagerFactory.cs:line 29
at Mail2Bug.Mail2BugEngine..ctor(InstanceConfig configInstance, MailboxManagerFactory mailboxManagerFactory) in E:\Agent_work\4\s\Mail2Bug\Mail2BugEngine.cs:line 31
at Mail2Bug.MainApp.InitInstances(IEnumerable`1 configs) in E:\Agent_work\4\s\Mail2Bug\Main.cs:line 214
2017-04-19 07:53:27,769 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 0 ---------------
2017-04-19 07:53:28,783 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 1 ---------------
2017-04-19 07:53:29,797 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 2 ---------------
2017-04-19 07:53:30,811 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 3 ---------------
2017-04-19 07:53:31,825 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 4 ---------------
2017-04-19 07:53:32,839 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 5 ---------------
2017-04-19 07:53:33,853 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 6 ---------------
2017-04-19 07:53:34,867 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 7 ---------------
2017-04-19 07:53:35,881 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 8 ---------------
2017-04-19 07:53:36,895 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 9 ---------------
2017-04-19 07:53:37,908 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 10 ---------------
2017-04-19 07:53:38,922 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 11 ---------------
2017-04-19 07:53:39,936 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 12 ---------------
2017-04-19 07:53:40,950 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 13 ---------------
2017-04-19 07:53:41,964 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 14 ---------------
2017-04-19 07:53:42,978 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 15 ---------------
2017-04-19 07:53:43,992 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 16 ---------------
2017-04-19 07:53:45,006 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 17 ---------------
...

Any thoughts on what I should be looking at?

If I restart the mail2bug, It starts to initialize, and then about 3 minutes in I get an error. I'm not sure where it's failing.

E:\Mail2Bug_SVC>Mail2Bug.exe
2017-04-19 08:08:14,936 [1] INFO Mail2Bug.MainApp [(null)] - Initializing engine for instance 'Mail2BugConfigMyInstance
Name' (Persistent? True)
2017-04-19 08:08:14,982 [1] INFO Mail2Bug.Mail2BugEngine [(null)] - Initalizing MailboxManager
2017-04-19 08:08:14,998 [1] INFO Mail2Bug.Helpers.DPAPIHelper [(null)] - Reading encrypted data from file .\Resources\p
assword.bin
2017-04-19 08:08:14,998 [1] INFO Mail2Bug.Email.EWS.EWSConnectionManger [(null)] - Creating FolderMailboxManager for (t
[email protected], CORP\tfsbuild1_svcacct, 1128924882, False)
2017-04-19 08:11:25,908 [1] ERROR Mail2Bug.MainApp [(null)] - Exception while initializing instance 'Mail2BugConfigMyIns
tanceName'

Microsoft.Exchange.WebServices.Data.AutodiscoverLocalException: The Autodiscover service couldn't be located.
at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.InternalGetLegacyUserSettings[TSettings](String em
ailAddress, List1 redirectionEmailAddresses, Int32& currentHop) at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.GetLegacyUserSettings[TSettings](String emailAddre ss) at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.InternalGetLegacyUserSettings(String emailAddress, List1 requestedSettings)
at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.GetUserSettings(String userSmtpAddress, UserSettin
gName[] userSettingNames)
at Microsoft.Exchange.WebServices.Data.ExchangeService.GetAutodiscoverUrl(String emailAddress, ExchangeVersion reques
tedServerVersion, AutodiscoverRedirectionUrlValidationCallback validateRedirectionUrlCallback)
at Microsoft.Exchange.WebServices.Data.ExchangeService.AutodiscoverUrl(String emailAddress, AutodiscoverRedirectionUr
lValidationCallback validateRedirectionUrlCallback)
at Mail2Bug.Email.EWS.EWSConnectionManger.ConnectToEWS(Credentials credentials, Boolean useConversationGuidOnly) in E
:\Agent_work\4\s\Mail2Bug\Email\EWS\EWSConnectionManger.cs:line 91
at Mail2Bug.Email.EWS.EWSConnectionManger.GetConnection(Credentials credentials, Boolean useConversationGuidOnly) in
E:\Agent_work\4\s\Mail2Bug\Email\EWS\EWSConnectionManger.cs:line 61
at Mail2Bug.Email.MailboxManagerFactory.CreateMailboxManager(EmailSettings emailSettings) in E:\Agent_work\4\s\Mail2
Bug\Email\MailboxManagerFactory.cs:line 29
at Mail2Bug.Mail2BugEngine..ctor(InstanceConfig configInstance, MailboxManagerFactory mailboxManagerFactory) in E:\Ag
ent_work\4\s\Mail2Bug\Mail2BugEngine.cs:line 31
at Mail2Bug.MainApp.InitInstances(IEnumerable`1 configs) in E:\Agent_work\4\s\Mail2Bug\Main.cs:line 214
2017-04-19 08:11:25,924 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 0 ---------------
2017-04-19 08:11:26,938 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 1 ---------------
2017-04-19 08:11:27,952 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 2 ---------------
2017-04-19 08:11:28,966 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 3 ---------------
2017-04-19 08:11:29,980 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 4 ---------------
2017-04-19 08:11:30,994 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 5 ---------------
2017-04-19 08:11:32,008 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 6 ---------------
2017-04-19 08:11:33,022 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 7 ---------------
2017-04-19 08:11:34,036 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 8 ---------------
2017-04-19 08:11:35,050 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 9 ---------------
2017-04-19 08:11:36,064 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 10 ---------------
2017-04-19 08:11:37,078 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 11 ---------------
2017-04-19 08:11:38,092 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 12 ---------------
2017-04-19 08:11:39,106 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 13 ---------------
2017-04-19 08:11:40,120 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 14 ---------------
2017-04-19 08:11:41,134 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 15 ---------------
2017-04-19 08:11:42,148 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 16 ---------------
2017-04-19 08:11:43,162 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 17 ---------------
2017-04-19 08:11:44,176 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 18 ---------------
2017-04-19 08:11:45,190 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 19 ---------------
2017-04-19 08:11:46,204 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 20 ---------------
2017-04-19 08:11:47,218 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 21 ---------------
2017-04-19 08:11:48,232 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 22 ---------------
2017-04-19 08:11:49,246 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 23 ---------------
2017-04-19 08:11:50,260 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 24 ---------------
2017-04-19 08:11:51,274 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 25 ---------------
2017-04-19 08:11:52,288 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 26 ---------------
2017-04-19 08:11:53,302 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 27 ---------------
2017-04-19 08:11:54,316 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 28 ---------------
2017-04-19 08:11:55,330 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 29 ---------------
2017-04-19 08:11:56,344 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 30 ---------------
2017-04-19 08:11:57,358 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 31 ---------------
2017-04-19 08:11:58,372 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 32 ---------------
2017-04-19 08:11:59,386 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 33 ---------------
2017-04-19 08:12:00,400 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 34 ---------------
2017-04-19 08:12:01,414 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 35 ---------------
2017-04-19 08:12:02,428 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 36 ---------------
2017-04-19 08:12:03,441 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 37 ---------------
2017-04-19 08:12:04,455 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 38 ---------------
2017-04-19 08:12:05,469 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 39 ---------------
2017-04-19 08:12:06,483 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 40 ---------------
2017-04-19 08:12:07,513 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 41 ---------------
2017-04-19 08:12:08,527 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 42 ---------------
2017-04-19 08:12:09,541 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 43 ---------------
^C
E:\Mail2Bug_SVC>

Exception while initializing instance 'Builds'

Hi,

I get below error during start up, any idea how to fix this? (exchange user name and password seems to correct)
2016-07-18 22:46:21,449 [1] INFO Mail2Bug.MainApp [(null)] - Initializing engine for instance 'Builds' (Persistent? True)
2016-07-18 22:46:21,496 [1] INFO Mail2Bug.Mail2BugEngine [(null)] - Initalizing MailboxManager
2016-07-18 22:46:21,511 [1] INFO Mail2Bug.Helpers.DPAPIHelper [(null)] - Reading encrypted data from file .\Resources\mail2bug.bin
2016-07-18 22:46:21,527 [1] INFO Mail2Bug.Email.EWS.EWSConnectionManger [(null)] - Creating FolderMailboxManager for ([email protected], DIR\user1, 853411762)
2016-07-18 22:46:27,559 [1] ERROR Mail2Bug.MainApp [(null)] - Exception while initializing instance 'Builds'
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at System.DirectoryServices.ResultPropertyValueCollection.get_Item(Int32 index)
at Microsoft.Exchange.WebServices.Autodiscover.DirectoryHelper.GetScpUrlList(String domainName, String ldapPath, Int32& maxHops)
at Microsoft.Exchange.WebServices.Autodiscover.DirectoryHelper.GetAutodiscoverScpUrlsForDomain(String domainName)
at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.GetAutodiscoverServiceUrls(String domainName, Int32& scpHostCount)
at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.GetAutodiscoverServiceHosts(String domainName, Int32& scpHostCount)
at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.GetSettings[TGetSettingsResponseCollection,TSettingName](List1 identities, List1 settings, Nullable1 requestedVersion, GetSettingsMethod2 getSettingsMethod, Func1 getDomainMethod) at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.GetUserSettings(List1 smtpAddresses, List1 settings) at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.InternalGetSoapUserSettings(String smtpAddress, List1 requestedSettings)
at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.GetUserSettings(String userSmtpAddress, UserSettingName[] userSettingNames)
at Microsoft.Exchange.WebServices.Data.ExchangeService.GetAutodiscoverUrl(String emailAddress, ExchangeVersion requestedServerVersion, AutodiscoverRedirectionUrlValidationCallback validateRedirectionUrlCallback)
at Microsoft.Exchange.WebServices.Data.ExchangeService.AutodiscoverUrl(String emailAddress, AutodiscoverRedirectionUrlValidationCallback validateRedirectionUrlCallback)
at Mail2Bug.Email.EWS.EWSConnectionManger.ConnectToEWS(Credentials credentials) in h:\Downloads\mail2bug-master\mail2bug-master\Mail2Bug\Email\EWS\EWSConnectionManger.cs:line 91
at Mail2Bug.Email.EWS.EWSConnectionManger.GetConnection(Credentials credentials) in h:\Downloads\mail2bug-master\mail2bug-master\Mail2Bug\Email\EWS\EWSConnectionManger.cs:line 61
at Mail2Bug.Email.MailboxManagerFactory.CreateMailboxManager(EmailSettings emailSettings) in h:\Downloads\mail2bug-master\mail2bug-master\Mail2Bug\Email\MailboxManagerFactory.cs:line 29
at Mail2Bug.Mail2BugEngine..ctor(InstanceConfig configInstance, MailboxManagerFactory mailboxManagerFactory) in h:\Downloads\mail2bug-master\mail2bug-master\Mail2Bug\Mail2BugEngine.cs:line 31
at Mail2Bug.MainApp.InitInstances(IEnumerable`1 configs) in h:\Downloads\mail2bug-master\mail2bug-master\Mail2Bug\Main.cs:line 214
2016-07-18 22:46:27,575 [1] INFO Mail2Bug.MainApp [(null)] - --------------- Iteration 0 ---------------

Thanks
Muthu

Can this be updated to work with VS 2015 and TFS 2015 update 3

I'm a "hack my way through it" programmer, I have pulled down the source and looking at the references and there are Lots of warning. Has anyone gone through the process of updating it this for VS 2015?

I'll take a stab at it, but I may not be doing it right.

Thanks

Pat

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.