Example code to send
text messages written in php. This
code requires phpmailer class. You can download free phpmailer from http://phpmailer.sourceforge.net/.
This code is provided as sample only.
<?php
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP(); // set mailer to use SMTP
$mail->Host = "ipipi.com";
// specify main and backup server
$mail->SMTPAuth = true; // turn
on SMTP authentication
$mail->Port =25;
$mail->Username = "YoureIPIPIUsername";
// SMTP username at ipipi
$mail->Password = "YourPassword";
// SMTP password
$mail->From = "YourUserName@ipipi.com";
$mail->FromName = "Your Name";
$mail->AddAddressTo("DestinationPhoneNumber@sms.ipipi.com",
"Receiver Name");
$mail->Subject = "Compression
Option goes here - find out more";
$mail->Body = "Your Message";
if(!$mail->Send())
{
echo "Message could not be sent. <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}
echo "Message has been sent";
?>
|