cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with Send Email in MS Outlook VBO

Hello, after running successfully for a year, this action stopped working: MS Outlook VBO - Send Mail. It seems to be failing on this step that sends an email from the non-default mailbox. 

mail.SendUsingAccount(acct)

Because if I comment it out, the rest runs, and sends an email from the default mail box. The issue may be with the casting in relation to the preceding code: 

Dim _nameSpace As Microsoft.Office.Interop.Outlook.NameSpace = app.GetNameSpace("MAPI")
Dim aa As List(Of Account) = _nameSpace.Accounts.Cast(Of Account).ToList()
Dim acct = aa.Where(Function(x) x.DisplayName = Account_Display_Name).FirstOrDefault()
mail.SendUsingAccount(acct)

Any ideas appreciated. Thanks

 

 

 

0 REPLIES 0