function main()
{
    $form_valid = validate_form_input();
    if ($form_valid !== TRUE) {
        echo $form_valid;
    } else {
        $params = $GLOBALS["params"];
        $headers = $GLOBALS["headers"];
        if (mail($params["to"], $params["subject"], $params["message"], $headers)) {
            echo "Your important message was sent to the following email addresses:\n\n";
            $addresses = multiexplode(array(",", ";"), $params["to"]);
            foreach ($addresses as $address) {
                echo $address . "\n";
            }
            echo "Thank you for using our mail form. Have a nice day. HORRIE!!!\n\n";
            //echo "HEADERS: " . $headers . "\n";
        } else {
            echo "Sorry, an error occurred and your mail was not sent. HORRIE!!!";
        }
    }
}
      * encrypting them for use in any production environment, and ensure
      * hat only authorized individuals may view or modify them.
      */
     // Use default sdk-seller account
     $profile->setAPIUsername('sdk-seller_api1.sdk.com');
     $profile->setAPIPassword('12345678');
     $profile->setSignature(null);
     $profile->setCertificateFile($cert_file_path);
     $profile->setSignature($_POST['signature']);
     $profile->setEnvironment(ENVIRONMENT);
     $logger->_log('Profile: ' . print_r($profile, true));
 } else {
     // Use My Account
     // Either with certificate file or 3-token
     // Validate posted variables
     $errors = validate_form_input($_POST);
     if (!empty($_REQUEST['authSignature'])) {
         $profile->setAuthSignature($_REQUEST['authSignature']);
         $profile->setAuthToken($_REQUEST['authToken']);
         $profile->setAuthTimestamp($_REQUEST['authTimesStamp']);
     } else {
         $profile->setAPIUsername($_POST['apiUsername']);
         $profile->setAPIPassword($_POST['apiPassword']);
         $profile->setSignature($_POST['signature']);
         $profile->setSubject($_POST['subjectEmail']);
     }
     if (isset($save_file)) {
         $profile->setCertificateFile($save_file);
     }
     $profile->setEnvironment(ENVIRONMENT);
     $logger->_log('Profile: ' . print_r($profile, true));