ASP Is Fun

Learning ASP
Free Course
Basics
Functions
SQL Commands
Sample Code

Servers / Setup
Host Reviews
Server Setup
Error Tips

Contract ASP
Development

Intro to ASP



 


Creating an ASP Ebook



The trick really isn't creating the ebook. All an ebook is is a PDF file - and pretty much any word processor can output one of those. The trick is how to GET the ebook to your end user without having the entire web download it for free.

The way to do this is to mail it as an attachment. When the user returns from PayPal, do some verification with cookies or return codes. My site discusses many different ways to handle this. When you are sure this user is a valid person, then ask them for their email address.

The code you want to then use is:

Set objMail= Server.CreateObject("CDO.Message")
 With objMail
	  .From = "webmaster@aspisfun.com"
	  .To =  Email
	  .Subject = "Ebook from ASPIsFun"
	  .TextBody = BodyTxt
	  .AddAttachment "E:\ebookdir\yourebook.pdf"
	  .Send
 End With
Set objMail = Nothing

The beauty of this is that the /ebookdir/ directory is NOT on the web. It is a protected directory on your hard drive. While your mail package can get to it, the web users can't. It won't be indexed, spidered or stolen. It will only be mailed out to that one user who paid for it.

ASP Free Sample Code Directory


ASP Main Page | ASP Ebooks | Free ASP Course | Contact Lisa
All content copyright © 2008 Minerva WebWorks LLC. All rights reserved.



Free Newsletter!

Ebooks
Intro to ASP
ASP SQL DB
Members
Shopping


Introduction to ASP

Romance Tips
Irish Romance
Italian Romance
French Romance

ASP Poll
How do you handle 500 errors?
I don't
Page does nothing
Displays error
Emails error