Affiliate Master

     STEP SIX:  Configuring the email files

     This step is fairly straight forward.  It explains how the email template files are setup, and how you display data from the order/resellers form within the email.

     ABOUT THE EMAIL FILE NAMES
     WHERE TO PLACE THE EMAIL TEMPLATE FILES
     EDITING THE EMAIL TEMPLATE FILES
     WHERE EMAIL IS SENT

 

     ABOUT THE EMAIL FILE NAMES

     The default files names are:

touser.txt
Sent to the user with their new reseller information
  
tosupport.txt
Sent to support, contains all the data on the order form
  
tosponsor.txt
Sent to the sponsor, notifying them of the new signup/order

     You may add/remove email template files as desired.  Be sure to adjust the @array_emails setting in STEP THREE as needed.

[return to top]

 

     WHERE TO PLACE THE EMAIL TEMPLATE FILES

     These email template files can be placed in the same directory as the placeorder.cgi.  

     In the default setup, the settings are to look in a directory called emails, which is off the current directory that placeorder.cgi is in.  This is useful as it reduced the number of files in the one directory.  Simple create a directory called emails and upload the email template files there.

[return to top]

 

     EDITING THE EMAIL TEMPLATE FILES

     The way the email template files are used is quite simple.  Within each file are key fields, which are field found between square brackets (  [ .. ]  , [FIRSTNAME],   [LASTNAME]).

     Any valid field on the order/reseller form is a valid key.  Simply take the field name, place in within the email as desired, and put the field name in square brackets.

     Example:   website
          Website:   [WEBSITE]

     NOTE:   The word WEBSITE can be lower case also.

     The best way to learn how keys are used is to review the examples email template files (touser.txt, tosponsor.txt and tosupport.txt).

     Here is a list of the built/default keys

[FIRSTNAME]  user's first name
[LASTNAME]  user's last name
[FULLNAME]  combines  firstname and lastname as one field
[EMAIL]   users's email address
[IDNUMBER]  assigned reseller id
[SPONSORID]  the reseller/sponsor of the webpage
[SPONSORFULLNAME]  reseller/sponsor full name
[SPONSOREMAIL]  reseller/sponsor email address
[ORDERAMT]  total amount of order
[COMMISSIONS]  commissions paid out for order
[CARDTYPE]  the credit card type submitted
[CARDNUMBER]  the credit card number

     These are the current built in keys.  Any addition keys/fields on the order form should be added to the proper email template files as needed.

[return to top]

 

     WHERE EMAIL IS SENT

     To tell the script where to send the email template file (what email address), edit the first line of the file.

     A typical email template file that is sent to the new user, from support would be (taken from the touser.txt file):

To: "[FULLNAME]" <[EMAIL]>
From: "Your Name" <username@youremail.com>
Subject: [FIRSTNAME], Welcome To Our Reseller Program!

     The To: field is the key field for determining where the email template file will be sent.

[return to top]