Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Components Discussions specific to components in ASP 3.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Components section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old March 11th, 2005, 03:01 AM
Registered User
 
Join Date: Mar 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Permission denied

Hi all,

Hope I will get correct solution from this group

I have created a dll to read the mails from inbox folder and to send the mail-using outlook.

This is my dll code

Public Function sendMail()
Dim objOutlook As New Outlook.Application
Set objOutlook = CreateObject("Outlook.Application")

Dim objNamespace As Outlook.NameSpace
Set objNamespace = objOutlook.GetNamespace("MAPI")

Dim objInbox As Outlook.mapiFolder
'Set objInbox = CreateObject("Outlook.MAPIFolder")
Set objInbox = objNamespace.GetDefaultFolder(olFolderInbox)
Dim objItems As Outlook.Items
Set objItems = objInbox.Items

Dim oMsg As Outlook.MailItem

Dim i As Integer
For i = 1 To 5
    'Set oMsg = objItems.Item(i)
    'MsgBox ("Message number: " & i)
    'MsgBox ("From : " & oMsg.Subject)
    'MsgBox ("To : " & oMsg.Recipients)
Next i
'objInbox = objNamespace.GetDefaultFolder (Outlook.OlDefaultFolders.olFolderInbox)

Set MailItem = objOutlook.CreateItem(0)
With MailItem
     .Subject = "Test mail from VB"
     .To = "test@test.com"
     .Send
End With
End Function

My ASP code like
<%
set mailTestDll = server.CreateObject("Project1.class1")
mailTestDll.sendMail()
Response.Write("Success")
%>
If I access this code from localhost (http://localhost/inboxread.asp), mails are sending successfully. But if I access this page from another machine (http://pcnumber/inboxread.asp) I am getting the following error

Error Type:
Project1 (0x800A0046)
Permission denied
inboxTest.asp, line 3


Please advise me

Regards,
Arunachalam.S




Similar Threads
Thread Thread Starter Forum Replies Last Post
(0x800A0046) Permission denied,not IIS permission! David Hay Classic ASP Basics 3 April 30th, 2006 10:47 PM
fopen permission denied PPGpilot Beginning PHP 1 February 24th, 2006 03:56 PM
Permission denied zah_amir Classic ASP Databases 1 January 24th, 2006 11:45 PM
Permission Denied hamidmq Javascript How-To 2 March 10th, 2005 09:41 AM
Permission Denied einstein Linux 1 December 10th, 2003 09:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.