Código:
Que debo colocar en la pagina donde invoco la clase para que envie esos datos??require("class.phpmailer.php"); $mail = new PHPMailer(); $mail->PluginDir = "includes/"; $mail->Mailer = "smtp"; $mail->Host = "smtp.host.com.ar"; $mail->SMTPAuth = true; $mail->Username = "root"; $mail->Password = ""; $mail->From = $email_from_mail; $mail->FromName = $email_from_name; $query = "SELECT a196EMail FROM nett196ftaPessoa where a196Estado = 1"; $result = @MYSQL_QUERY($query, $dbi); while ($row = sql_fetch_array ($result, $dbi)) { $email_betreff = "$thema"; $mail->Subject = $email_betreff; $mail->Body = $emailbody; $mail->AltBody = $bodytext1; $mail->AddAddress($row["email"]); if(!$mail->Send()) { echo "<br>Problemas enviando correo electrónico a: " . $row["email"] . " "; echo "(" .$mail->ErrorInfo. ")<br>"; } else { $mensaje="<br>Boletín enviado a: " . $row["email"] . "<br>"; echo $mensaje; } $mail->ClearAddresses(); }
Gracias