############################################
# xt FormMailer 1.0
# by n1-studio.de
############################################
xt FormMailer is a class to submit data fast
over the email server.
Example:
<?
$my_name = "Mr. X";
$DoMail = new xEmail;
$DoMail->SetEmailCFG("yourname@provider.com","Test Email);
/*
With the second parameter of the function, you can set whether the field is requiered
or not. If you set it to 1, it will exit when $my_name is empty!
*/
$DoMail->AddValue($my_name, 0)
$DoMail->SendEmail();
?>
Thats all.
If you use HTML formulars and you want to submit checkboxes, you can use the function: "AddValueBox($BoxName, $value)"
It's very easy to use:
//Example, the name of the checkbox is unempl and it ask you whether you unemployed or not
$DoMail->AddValueBox("He is Unemployed", $unempl);
The Script will check if the checkbox is checked or not. If not the var will set to NULL. If it's checked, the first parameter of the function will be submitted in the email.
|