send() public method

If you pass the $schedule_time parameter, the send will be scheduled for a future time. Options: replyto: override Reply-To header test: send as test email (subject line will be marked, will not count towards stats)
public send ( string $template, string $email, array $vars = [], array $options = [], string $schedule_time = null ) : array
$template string
$email string
$vars array
$options array
$schedule_time string
return array API result
            } else {
                require_once 'client/requires.php';
                $client = new Sailthru_Client(get_option('sailthru_api_key'), get_option('sailthru_secret'));
                $replacement_fields = array();
                if (isset($_POST['fname'])) {
                    $replacement_fields['first_name'] = $_POST['fname'];
                }
                if (isset($_POST['lname'])) {
                    $replacement_fields['last_name'] = $_POST['lname'];
                }
                $all_lists = $form->get_all_lists();
                $lists = array();
                if ($has_lists) {
                    foreach ($all_lists as $id => $list_name) {
                        if (in_array($id, $_POST['lists'])) {
                            $lists[$list_name] = '1';
                        }
                    }
                }
                $client->setEmail($_POST['email'], $replacement_fields, $lists);
                if ((bool) get_option('sailthru_welcome') && ($template = get_option('sailthru_welcome_template'))) {
                    require_once 'client/requires.php';
                    $client = new Sailthru_Client(get_option('sailthru_api_key'), get_option('sailthru_secret'));
                    $r = $client->send($template, $_POST['email'], $replacement_fields, array());
                }
                echo '{}';
            }
        }
        break;
}
die;
 function wp_mail($to, $subject, $message, $headers = '', $attachments = array())
 {
     extract(apply_filters('wp_mail', compact('to', 'subject', 'message', 'headers', 'attachments')));
     //can sailthru handle attachments?  I don't think it can at the moment..
     if (!is_array($attachments)) {
         $attachments = explode("\n", $attachments);
     }
     $replacements = array('subject' => $subject, 'body' => $message);
     require_once 'client/requires.php';
     $client = new Sailthru_Client(get_option('sailthru_api_key'), get_option('sailthru_secret'));
     $r = $client->send('WordPress Template', $to, $replacements, array());
     return true;
 }