How to pass url with Smart Mailer and insert record

This tutorial will walk you through the process of creating a form that a user can fill out, the results are inserted into a database and a personalized mail is send to the user based on a template. I am using a url parameter to pass the user's name to the template page that is send to the user by mail.

I created a pdf file of this tutorial. You can download it by clicking on the Code Download link in the blue properties box.

Apply Smart Mailer: Attachments

 No attachments added for this tutorial.

Apply Smart Mailer: Setup

There are four components: CDO (WinXP/Win2000), CDONTS (NT4/Win2000), JMail and ASPEmail.

Select the Server Component you are using. I unchecked the option Ignore errors so if the mail does not go through there will be an error message.

Click OK

Click the OK button to apply the Smart Mailer extension. A message box will appear that the files incSmartMailer.asp have been copied into your scriptlibrary folder. Make sure you upload the file to the server.

Create the insert record

To be able to insert records into your database, open the Insert Record behavior from the Server Behaviors panel.
My Connection is called test, table users.

The mail template page

In the mail.asp page we now need to add the code that will display the user's name. Open the appropriate page.
Go to the Bindings panel, click on the + sign and select Request Variable. This time select the Request.Querystring and enter name.





Put your cursor after the salutationDear and go to Server Behaviors | Dynamic Text
Select the QueryString.name and click OK.

Your page will look like this.



Save your page and that is it.

George Petrov

George PetrovGeorge Petrov is a renowned software writer and developer whose extensive skills brought numerous extensions, articles and knowledge to the DMXzone- the online community for professional Adobe Dreamweaver users. The most popular for its over high-quality Dreamweaver extensions and templates.

George is also the founder of Wappler.io - the most Advanced Web & App Builder

See All Postings From George Petrov >>

Comments

Be the first to write a comment

You must me logged in to write a comment.