Click to See Complete Forum and Search --> : [RESOLVED] ASP email address logger


Marcus Maximus
04-07-2010, 06:56 AM
We have an internal custom program in-house for CRM and we export all email address weekly for a mailer to another external program on our web server.

We currently receive emails and manually unsubscribe people from our email database weekly as they come in.

I would like to write a simple unsubscribe script that writes to an access database or text file that i can later import into our access based CRM. We have an IIS server available here but i've never used ASP before.

I found the following script that is supposed to write to a text file but i get an error back while testing.

<form method=post action=''>
<input type=text name=email><input type=submit value=Submit>
</form>
<%
Dim email
email = Request("email")
if len(email) > 2 Then
Const Appending=8
Dim OpenFileobj, FSOobj,FilePath
FilePath=Server.MapPath("text.txt") ' located in the same directory
Set FSOobj = Server.CreateObject("Scripting.FileSystemObject")
if FSOobj.fileExists(FilePath) Then
Set OpenFileobj = FSOobj.OpenTextFile(FilePath, Appending)
OpenFileobj.WriteLine(email)
OpenFileobj.Close
Set OpenFileobj = Nothing
Else
Response.Write "File does not exist"
End if
Set FSOobj = Nothing
End if
%>

I get the following error

Microsoft VBScript runtime error '800a0046'

Permission denied

/newsletter/Removeasa.asp, line 13

Marcus Maximus
04-07-2010, 07:44 AM
It was a permissions issue. Had to allow everybody to allow to write to files