\n"; $header .= "X-Sender: \n"; $header .= "X-Mailer: PHP\n"; //mailer $header .= "X-Priority: 3\n"; $header .= "Return-Path: \n"; @mail($receipient, $subject, $message, $header); } function secondsToTime($seconds){ // extract hours $hours = floor($seconds / (60 * 60)); // extract minutes $divisor_for_minutes = $seconds % (60 * 60); $minutes = floor($divisor_for_minutes / 60); // extract the remaining seconds $divisor_for_seconds = $divisor_for_minutes % 60; $seconds = ceil($divisor_for_seconds); // return the final array $obj = array( "h" => (int) $hours, "m" => (int) $minutes, "s" => (int) $seconds, ); return $obj; } function secondsToTimeDays($seconds) { $dtF = new \DateTime('@0'); $dtT = new \DateTime("@$seconds"); return $dtF->diff($dtT)->format('%a days / %h hours / %i minutes'); } function sendFinisherEmail($name, $email) { $header = "MIME-Version: 1.0\n"; $header .= "Content-type: text/html; charset=\"iso-8859-1\"\n"; $header .= "From: togo920@togoparts.com \n"; $header .= "X-Sender: \n"; $header .= "X-Mailer: PHP\n"; $header .= "X-Priority: 3\n"; $header .= "Return-Path: \n"; $message = '
 
Togoparts Play Storegoogle plustwitterTogoparts Apple Storefacebook
 
 
 
Hi ' . $name . ',

Congratulations! You have completed 920km and have qualified for the #TOGO920 Finisher Jersey.

To get the Sun Sleeves, come in as Top 100. To have the Cap into the mix, come in as Top 50 by the end of the Challenge (17th July 2359hrs)!

That\'s not all! Beat 2,000km to qualify for the Red Elite Finisher Jersey.


All the best!


Your #TOGO920 Cheerleading Team,
Benjamin, Charlie & Serena.

If you are having problems, read our FAQ first. After which please feel free to drop us an email at togo920@togoparts.com or call us +65 6533 3150 10am – 6pm Mondays to Fridays.


 
  
'; echo $message; $subject = 'Congratulations on Finishing #TOGO920!'; if(@mail($email, $subject, $message, $header)) { echo "Mail Sent Successfully.
"; } else { echo "Mail Not Sent.
"; } } function sendEliteEmail($name, $email) { $header = "MIME-Version: 1.0\n"; $header .= "Content-type: text/html; charset=\"iso-8859-1\"\n"; $header .= "From: togo920@togoparts.com \n"; $header .= "X-Sender: \n"; $header .= "X-Mailer: PHP\n"; $header .= "X-Priority: 3\n"; $header .= "Return-Path: \n"; $message = '
 
Togoparts Play Storegoogle plustwitterTogoparts Apple Storefacebook
 
 
 
Hi ' . $name . ',

Congratulations! You have completed 2,000km and the red ELITE #TOGO920 Finisher Jersey is now yours.

There\'s still the Top100 Sun Sleeves and Top50 Cap to win! Come in as a Top 100 and as Top 50 Finisher respectively by the end of the Challenge (17th July 2359hrs)


All the best!


Your #TOGO920 Cheerleading Team,
Benjamin, Charlie & Serena.

If you are having problems, read our FAQ first. After which please feel free to drop us an email at togo920@togoparts.com or call us +65 6533 3150 10am – 6pm Mondays to Fridays.


 
  
'; echo $message; $subject = 'Congratulations! You are an Elite #TOGO920 Finisher!'; if(@mail($email, $subject, $message, $header)) { echo "Mail Sent Successfully.
"; } else { echo "Mail Not Sent.
"; } } function sendConfirmationEmail920($subject, $name, $receipient = 'marvin.baga@oneshift.com', $user_data) { $header = "MIME-Version: 1.0\n"; $header .= "Content-type: text/html; charset=\"iso-8859-1\"\n"; $header .= "From: togo920@togoparts.com \n"; $header .= "X-Sender: \n"; $header .= "X-Mailer: PHP\n"; $header .= "X-Priority: 3\n"; $header .= "Return-Path: \n"; $message = '
 
Togoparts Play Storegoogle plustwitterTogoparts Apple Storefacebook
 
 
 
Dear '. $name .',

You have successfully registered for #TOGO920!

Your Details
Name '.$user_data["first_name"].' '.$user_data["last_name"].'
Date of Birth '.$user_data["dob"].'
Mobile '.$user_data["mobile"].'
Address '.$user_data["address"].', '.$user_data["city"].', '.$user_data["country"].' '.$user_data["postal_code"].'
Jersey Size '.strtoupper($user_data["jersey_size"]).'

You can now clock your rides using the Strava app on iOS or Android. Togoparts will automatically collect your ride distance thru Strava from the 14th May 2016 00:00hrs till the 17th July 2016 23:59hrs. There is no need to do anything else. Once you hit 920km before 17th July 2016 you will automatically qualify for the Finisher Jersey.

New to #TOGO920, seasoned cyclists who clock more than 2,000km will get an specially coloured ELITE Finisher Jersey! Following up from #TOGO810 the Top Man and Woman who clocks the furthest distance for #TOGO920 will get the Blue and Purple Jersey Respectively.

The Top 100 cyclists who clock the MOST distance within the Challenge dates will receive a special "Top100" #TOGO920 Arm Warmers on top of the Finisher Jersey!

All the best for completing 920km and more! Join the TOGO920 Strava group, then you may check your progress and how you stack up with other participants in the Togo920 Challenge Leaderboard.

For more information on Togo920 check out our FAQ Section and the Rules and Regulations Page. Also check out the forums to connect with fellow riders to get started!


GET SOCIAL WITH #TOGO920

Document your journey with the hashtag and see what your friends are doing!


STAY IN TOUCH WITH #TOGO920

Get notified with the latest #TOGO920 news and progress updates with the Togoparts App.



 
 
'; if(@mail($receipient, $subject, $message, $header)) { error_log('Email sent successfully'); } else { error_log('Error sending email'); } } function sendReminderEmailStrava($uid) { if(!is_numeric($uid) || $uid < 1) { exit; } $challengerUser = ChallengeUser::byId($uid); $header = "MIME-Version: 1.0\n"; $header .= "Content-type: text/html; charset=\"iso-8859-1\"\n"; $header .= "Bcc: marvin.baga@togoparts.com\r\n"; $header .= "From: togo920@togoparts.com \n"; $header .= "X-Sender: \n"; $header .= "X-Mailer: PHP\n"; //mailer $header .= "X-Priority: 3\n"; //1 UrgentMessage, 3 Normal $header .= "Return-Path: \n"; $message = '
 
Togoparts Play Storegoogle plustwitterTogoparts Apple Storefacebook
 
 
 
Dear '.$challengerUser->first_name.',

Your registration for TOGO920 is successful! Just a couple of things to get you setup for the Challenge if you have not done so already.
  1. Login / Signup to Strava account on our page, so you can keep track and monitor your progress.

  2. '; //disabled as strava page is currently not accessible $message .= '
  3. Visit TOGO920 Strava Club Page to request to join.

  4. '; $message .= '
  5. Download Stava app for you iOS or Android phone.

    '; $message .= '
  6. Record or log your rides into Strava every time you go out for a ride.
  7. Check out your standings on the TOGO920 Leaderboard.
If you have trouble taking the steps above, please contact us at togo920@togoparts.com or give us a call at +65 6533 3150, Mondays - Fridays, 10:00-6:00pm.
 
 
'; //echo($message); mail($challengerUser->email, 'TOGO920 - Registration Successful! Next Steps', $message, $header); } function sendStravaConfirmationEmailTest($subject, $name, $receipient = 'marvin.baga@oneshift.com', $user_data) { $header = "MIME-Version: 1.0\n"; $header .= "Content-type: text/html; charset=\"iso-8859-1\"\n"; $header .= "From: marvin.baga@oneshift.com \n"; $header .= "X-Sender: \n"; $header .= "X-Mailer: PHP\n"; $header .= "X-Priority: 3\n"; $header .= "Return-Path: \n"; $receipient .= ',marvin.baga@togoparts.com'; $message = '
 
Togoparts Play Storegoogle plustwitterTogoparts Apple Storefacebook
 
 
 
Dear '. $name .',

You have successfully registered for #TOGO920!

Your Details
Username '.$user_data["username"].'
Name '.$user_data["first_name"].' '.$user_data["last_name"].'
Date of Birth '.$user_data["dob"].'
Mobile '.$user_data["mobile"].'
Address '.$user_data["address"].', '.$user_data["city"].', '.$user_data["country"].' '.$user_data["postal_code"].'
Jersey Size '.strtoupper($user_data["jersey_size"]).'

You can now clock your rides using the Strava app on iOS or Android. Togoparts will automatically collect your ride distance thru Strava from the 14th May 2016 00:00hrs till the 17th July 2016 23:59hrs. There is no need to do anything else. Once you hit 920km before 17th July 2016 you will automatically qualify for the Finisher Jersey.

New to #TOGO920, seasoned cyclists who clock more than 2,000km will get an specially coloured ELITE Finisher Jersey! Following up from #TOGO810 the Top Man and Woman who clocks the furthest distance for #TOGO920 will get the Blue and Purple Jersey Respectively.

The Top 100 cyclists who clock the MOST distance within the Challenge dates will receive a special "Top100" #TOGO920 Arm Warmers on top of the Finisher Jersey!

All the best for completing 920km and more! Join the TOGO920 Strava group, then you may check your progress and how you stack up with other participants in the Togo920 Challenge Leaderboard.

For more information on Togo920 check out our FAQ Section and the Rules and Regulations Page. Also check out the forums to connect with fellow riders to get started!


GET SOCIAL WITH #TOGO920

Document your journey with the hashtag and see what your friends are doing!


STAY IN TOUCH WITH #TOGO920

Get notified with the latest #TOGO920 news and progress updates with the Togoparts App.



 
 
'; @mail($receipient, $subject, $message, $header); } ?>

#TOGO920 on

Instagram
See more

Hi ! Here's your stats.