954,600 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Email address Logger

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.

MarcusMaximus
Newbie Poster
21 posts since Apr 2008
Reputation Points: 10
Solved Threads: 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 errorMicrosoft VBScript runtime error '800a0046'

Permission denied

/newsletter/Removeasa.asp, line 13

MarcusMaximus
Newbie Poster
21 posts since Apr 2008
Reputation Points: 10
Solved Threads: 0
 

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

MarcusMaximus
Newbie Poster
21 posts since Apr 2008
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You