'Email This Page to a Friend' at Your Website
Previous Topic  Next Topic 

Using some additional external processing (i.e. perhaps employing NetMailBot in tandem with a back-end database), you could use NetMailBot to send an HTML web page to a recipient specified by a visitor to that page. The visitor could fill in a friend's email address, their own email address, and a short message in a form ("Thought you might like to see this!"), then click on a "Send!" button. The sender's and recipient's email addresses and the URL of the intended web page would be sent by the browser to the back end, eventually being passed to an invocation of NetMailBot, using the -bodyfile parameter to send an email with an HTML message body coming from the web page's URL.


This would of course require some mechanism to specify the URL (HTML page) from which the request was sent (perhaps your web server might support this functionality already, or you could use a hidden form element, cookie, or other technique). You could have client-side functions insert the submitted data into the database, then the database would periodically check for emails to go out. You would thus want some sort of time stamp information and a flag to indicate whether each email had yet been sent. This scenario requires a bit more work and skill, but it is certainly an interesting use of NetMailBot in a "word of mouth"-style marketing application.