0

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.

1
Contributor
2
Replies
3
Views
7 Years
Discussion Span
Last Post by MarcusMaximus
0

I found the following script that is supposed t owrite 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

0

It was a permissions issue. Had to allow everybody the ability to write to files in the specific folder.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.