Smart Mailer PHP Support Product Page

Answered

Will Smart Mailer PHP work when called from JavaScript-executed URL with GET variables?

Asked 15 Jan 2013 22:17:57
1
has this question
15 Jan 2013 22:17:57 Craig Reynolds posted:
Will Smart Mailer PHP work when called from a script (as opposed to a form using POST variables) - this kind of thing:
<script language='JavaScript' type='text/javascript' src='www.blahblah.com/myscript.php?get1=abc&get2=xyz&etcetera...'></script>

I need something that will send out an HTML-formatted email to a customer after they buy a particular item.

The javascript example above will be triggered in the receipt page the customer gets after the purchase transaction is completed.

My script queries MySQL and sets new records, etc. based on GET variables given to my script, before sending out the email to the customer with the resulting data bits.

The email body must be able to use PHP variables to fill in the particulars for the order (giving the customer an Access Code for the product, for instance.)

I have been using a simple PHP mail() function, but we need to graduate from text emails to HTML.

Replies

Replied 07 Feb 2013 09:59:34
07 Feb 2013 09:59:34 Miroslav Zografski replied:
Hello Craig,

You can check the way Smart Mailer can be triggered - there are two possible ways - first - on form submit, and second - on page load.

So, using on page load, I think will fit your goal.

Then, since you have to use GET you can define those variables in Bindings panel in DW and use them to populate the
SmartMailer. Do define GET ( or URL ) variables in Bindings panel in Dreamweaver open the panel and click on [+] button
, select URL Variable from the dorp-down menu and in the resulted pop-up enter the variable name. Make this for each variable you would like to have available in Smart mailer.
Then when Setting up the SM simply click on the thunderbolt icon and select the necessary variable from the list.

Regards.

Reply to this topic