I would look at modifying a "Contact Us" form; for example:
This is a PHP example. I haven't tested it, but it looks half decent for a beginners tutorial
You would need to pull out some bits of it (ie you dont need to collect phone numbers). The most obvious other thing to modify is to change
@mail($email_to, $email_subject, $email_message, $headers);
@mail($email_from, $email_subject, $email_message, $headers);
so that it mails them the book; You would then modify the Comments variable to either include the sample chapter, or to link to a "secret" url that contains the sample chapter.