Parameters in functions fall into 2 basic categories. There are required parameters, and optional. The optional are shown as inside brackets []. You only have to supply the required parameters. For example, the email_send() function has 3 required parameters and 9 optional parameters. Parameters are separated by a comma. The letter in front of the parameter name indicates the type of value. "C" means character and will be in quotes. "N" is numeric and won't be entered with quotes. "L" is logical and with be either .T. or .F. If you place a value in an optional parameter, you don't use the brackets.
For example, the required values for email_send would be as below as the function is displayed, and with values entered. You must enter text for the subject line.
Code:
email_send(C send_to, C subject,C message)
email_send("BHPD104@aol.com","Email Notice","Form Has Data On It")
If you want to supply the first optional parameter, a file attachment, the result would be something like this if the file to attach is "c:\myfile.txt"
Code:
email_send("BHPD104@aol.com","Email Notice","Form Has Data On It","c:\myfile.txt")
It gets a bit more complicated if you want to use one optional parameter but skip the one listed before it. You still need to enter a value, but a blank is ok. For example, you may want to 'cc' (carbon copy) "otheremail@email.com" but not add an attachment. You still need a value in attachment, but it can be ""
Code:
email_send("BHPD104@aol.com","Email Notice","Form Has Data On It","","otheremail@email.com")
You can replace a character parameter with a character variable
Code:
email_addr = "BHPD104@aol.com"
subject = "Email Notice"
body_text = "Form Has Data On It"
email_send(email_addr,subject,body_text)
Bookmarks