PHP Classes

Help plase

Recommend this page to a friend!

      PHPMailer  >  All threads  >  Help plase  >  (Un) Subscribe thread alerts  
Subject:Help plase
Summary:Class.phpmail.php problem
Messages:1
Author:Esteban
Date:2006-06-23 22:25:42
 

  1. Help plase   Reply   Report abuse  
Picture of Esteban Esteban - 2006-06-23 22:25:43
i have this problem:

Mailer Error: Could not instantiate mail function.

the script is:

for ($i = 1; $i <= $data->sheets[0]['numRows']; $i++) {
for ($j = 1; $j <= $data->sheets[0]['numCols']; $j++) {
if (strstr($data->sheets[0]['cells'][$i][$j],'@')){
sleep(1);
$mail = new PHPMailer();
$mail->From = "info@winnersoft.cl";
$direccion=trim(strval($data->sheets[0]['cells'][$i][$j]));
echo '<br>'.$direccion;
$mail->AddAddress("'".$direccion."'");
$mail->AddEmbeddedImage('logo.jpg', 'CID', 'logo.jpg');
$mail->Subject = "Información Servicios";
$mail->Body = "\n\n Enterprise Ltda.";

if(!$mail->Send()){
echo " Mensaje no Enviado ";
echo " Mailer Error: " . $mail->ErrorInfo;
}
else {
echo " Mensaje Enviado ";
}
}
}
echo "<br>";
}

with only email works, like this:

$mail = new PHPMailer();
$mail->From = "info@company.tk";
$mail->AddAddress("algo@my.com");
$mail->AddEmbeddedImage('logo.jpg', 'CID', 'logo.jpg');
$mail->Subject = "Información Servicios";
$mail->Body = "\n\n Enterprise Ltda.";
if(!$mail->Send()){
echo " Msg Not Send "; //Mensaje no enviado
echo " Mailer Error: " . $mail->ErrorInfo;
}
else {
echo " Msg Send "; //mensaje enviado
}