'Select your Data Source...', 'OL' => 'Microsoft Outlook', 'OLMAC' => 'Outlook for Mac', 'GGL' => 'Google/Gmail Contacts and Calendar', 'ACT' => 'Act!', 'OLBCM' => 'Business Contact Manager', 'GM' => 'GoldMine', 'GW' => 'GroupWise', 'LN' => 'IBM Lotus Notes', 'PDT' => 'Palm Desktop', 'TC' => 'Time & Chaos', 'SF' => 'Salesforce', 'MON' => 'monday.com', 'ZO' => 'Zoho CRM', 'OSX' => 'Mac Contacts/Calendar apps', 'OTH' => 'Other...' ); $hhOptions = array( '' => 'Select a Data Target...', 'AND' => 'Android', 'APL' => 'iPhone or iPad', 'ICLD' => 'Apple iCloud', 'GGL' => 'Google', 'LIVE' => 'Windows Live/Hotmail/Outlook.Com', 'PCOL' => 'Outlook', 'TEAM' => 'Microsoft Teams', 'PCPDT' => 'Palm Desktop', 'OTH' => 'Other...' ); /* Gabriel * 9/16/15 * * Sending Mail: * A user can submit completely empty fields through the form. * - Since Mail needs a 'from' email address to build a mail object, sendmail will use 'noReply@companionlink.com' if the user * does not provide an email address. * - sendmail will also use 'noReply@companionlink.com' if the user provides a poorly formated email address (example: they forget * an '@' symbol or incomplete domain. * * Receiving Mail: * The receiving email is built from a hidden form value. * Example:
-- would go to marketing@companionlink.com * * When sendMail succesfully sends an email, it redirects to aboutus/sent.html * * Mail.php is found in /usr/share/pear */ require_once 'Mail.php'; class sendmail { protected $to; // receiver of email protected $submit; protected $fromEmail; protected $badEmail; protected $fromName; protected $fromPhone; protected $subject; protected $pim; protected $pda; protected $message; protected $host; protected $username; protected $password; protected $port; protected $from; protected $headers; protected $content; public function __construct($to, $submit, $fromEmail, $fromName, $fromPhone, $subject, $pim, $pda, $message) { $this->submit = $submit; $this->to = filter_var($to, FILTER_SANITIZE_STRING) . '@companionlink.com'; $email = $this->sanitizeEmail($fromEmail); $this->fromEmail = $email[0]; $this->badEmail = $email[1]; $this->fromName = $this->sanitizeVar($fromName, ''); $this->fromPhone = $this->sanitizeVar($fromPhone, ''); $this->subject = $this->sanitizeVar($subject, 'no subject'); $this->pim = $pim; $this->pda = $pda; $this->message = $this->sanitizeVar($message, ''); $this->host = "smtppro.zoho.com"; //"secure.emailsrvr.com"; $this->username = "marketing@companionlink.com"; $this->password = "XXyDd2CPaW3L6MhU!"; // "XXyDd2CPaW3L6MhU"; $this->port = "587"; // "25"; $this->from = "" . $this->fromName . " <" . $this->fromEmail . ">"; $this->headers = array ( 'From' => $this->from, 'To' => $this->to, 'Subject' => $this->subject, 'Content-Type' => 'text/plain; charset=UTF-8' ); $this->buildContent(); $this->submit(); } protected function sanitizeVar($var, $emptyVar) { $output = ''; if (isset($var)) { $output = filter_var($var, FILTER_SANITIZE_STRING); } else { $output = $emptyVar; } return $output; } protected function sanitizeEmail($email) { $output = array(); if (isset($email)) { $checkEmail = filter_var($email, FILTER_SANITIZE_EMAIL); $validateEmail = filter_var($checkEmail, FILTER_VALIDATE_EMAIL); if (!$validateEmail) { $output[0] = 'noReply@companionlink.com'; $output[1] = $checkEmail; } else { $output[0] = filter_var($email, FILTER_SANITIZE_EMAIL); $output[1] = ''; } } else { $output[0] = 'noReply@companionlink.com'; } return $output; } protected function buildContent() { $this->content = ""; $this->content .= 'Customer: ' . $this->fromName . "\n"; if ($this->badEmail == '') { $this->content .= 'Email: ' . $this->fromEmail . "\n"; } else { $this->content .= 'Broken Email: ' . $this->badEmail . "\n"; } $this->content .= 'Phone: ' . $this->fromPhone . "\n"; $this->content .= 'Subject: ' . $this->subject . "\n"; $this->content .= 'Pim: ' . $this->pim . "\n"; $this->content .= 'PDA: ' . $this->pda . "\n"; $this->content .= 'Content: ' . "\n \n" . $this->message . "\n"; } protected function buildMail() { $smtp = Mail::factory('smtp', array ('host' => 'localhost', 'auth' => false)); $send = $smtp->send($this->to, $this->headers, $this->content); if ($send) { header('Location: /aboutus/sent.html'); } } protected function submit() { if(isset($this->submit)) { $this->buildMail(); } } } //$sendMail = new sendmail($_POST['to'], $_POST['submit'], $_POST['email'], $_POST['name'], $_POST['phone'], $_POST['subject'], $_POST['pim'], $_POST['pda'], $_POST['message']); if ($_SERVER['REQUEST_METHOD'] === 'POST') { $sendMail = new sendmail( $_POST['to'] ?? '', $_POST['submit'] ?? '', $_POST['email'] ?? '', $_POST['name'] ?? '', $_POST['phone'] ?? '', $_POST['subject'] ?? '', $_POST['pim'] ?? '', $_POST['pda'] ?? '', $_POST['message'] ?? '' ); } ?> Send us feedback - CompanionLink Software, Inc.

How can we help?

What can we do to help you?

CompanionLink synchronizes more PC Applications, Web applications and devices than any other company.

Ask us anything.

We are here to help you get Your Data to Your Device