<?PHP
/*require_once('class.phpmailer.php');

$mail = new PHPMailer(); $mail--->
IsSMTP();
$mail->Host = "smtp1.example.com;smtp2.example.com";
$mail->SMTPAuth = true;
$mail->Username = 'smtpusername';
$mail->Password = 'smtppassword';

$mail->From="mailer@example.com";
$mail->FromName="Mi sitio";
$mail->Sender="mailer@example.com";
$mail->AddReplyTo("respuestas@example.com", "Responde a este mail");

$mail->AddAddress("email@example.com");
$mail->Subject = "Asunto de tu correo";

$mail->IsHTML(true);
 // adjunta files/imagen.jpg
$mail->AddEmbeddedImage('files/imagen.jpg', 'imagen','file/imagen.jpg','base64','image/jpeg');
$mail->Body = file_get_contents('TU_PLANTILLA_HTML.html');
if(!$mail->Send())
{
   echo "Error enviando: " . $mail->ErrorInfo;;
}
else
{
   echo "Mandado!";
}*/
?>


<?PHP
require_once('class.phpmailer.php');

echo $_SERVER['HTTPS'];

$mail             = new PHPMailer(); // defaults to using php "mail()"

$mail->IsSendmail(); // telling the class to use SendMail transport

$body             = file_get_contents('contents.html');
$body             = eregi_replace("[\]",'',$body);

$mail->AddReplyTo("name@yourdomain.com","First Last");

$mail->SetFrom('name@yourdomain.com', 'First Last');

$mail->AddReplyTo("name@yourdomain.com","First Last");

$address = "camenas1618@gmail.com";
$mail->AddAddress($address, "John Doe");

$mail->Subject    = "PHPMailer Test Subject via Sendmail, basic";

$mail->AltBody    = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test

$mail->AddEmbeddedImage('../imagenes/salu20160617032146.jpg', 'imagen','file/imagen.jpg','base64','image/jpeg');

$mail->MsgHTML($body);

$mail->AddAttachment("../imagenes/salu20160602010459.jpg");      // attachment

if(!$mail->Send()) {
  echo "Mailer Error: " . $mail->ErrorInfo;
} else {
  echo "Message sent!";
}
?>