I have a very simple bit of code that puts a message intot the Outbox of Outlook 2000. It uses the Outlook 10 Object Library and works perfectly within VB.NET. However, when I put exactly the same piece of code into an ASP.NET page (using excatly the same reference) it simply hangs when I try to add the email recipients.
I've been looking at this problem for a couple of days now and feel sure that the problem lies within the aspnet user permissions.
Here's the code.... As you can see it's pretty simple...
'On Error Resume Next
Dim oNewMail As Outlook.MailItem
Dim objOLApp As Outlook.Application
Dim x As Short
objOLApp = New Outlook.Application()
oNewMail = objOLApp.CreateIte(Outlook.OlItemType.olMailItem)
With oNewMail
.Subject = "Test Subject"
.Body = "Test Body"
.Recipients.Add("zc46@dial.pipx.com" - 'Hangs here....!
CType(oNewMail, Outlook._MailItem).Send()
End With
oNewMail = Nothing
objOLApp = Nothing
Any ideas?? It's driving me mad...!
Thanks,
Marcus.
I've been looking at this problem for a couple of days now and feel sure that the problem lies within the aspnet user permissions.
Here's the code.... As you can see it's pretty simple...
'On Error Resume Next
Dim oNewMail As Outlook.MailItem
Dim objOLApp As Outlook.Application
Dim x As Short
objOLApp = New Outlook.Application()
oNewMail = objOLApp.CreateIte(Outlook.OlItemType.olMailItem)
With oNewMail
.Subject = "Test Subject"
.Body = "Test Body"
.Recipients.Add("zc46@dial.pipx.com" - 'Hangs here....!
CType(oNewMail, Outlook._MailItem).Send()
End With
oNewMail = Nothing
objOLApp = Nothing
Any ideas?? It's driving me mad...!
Thanks,
Marcus.