tengo una problema, estoy intentando mandar un archivo adjunto, el cual esta en el servidor ya listo para ser enviado, el problema es que NO ENVIA nada, estoy usando la clase "phpmailer.class.php", el codigo es este:
Código PHP:
<?
require("class.phpmailer.php");
class MyMailer extends PHPMailer {
// Set default variables for all new objects
var $From = "[email protected]";
var $FromName = "Me";
var $Host = "200.58.112.52";
var $Mailer = "mail";
var $WordWrap = 75;
// Replace the default error_handler
function error_handler($msg) {
print("My Site Error");
print("Description:");
printf("%s", $msg);
exit;
}
// Create an additional function
function do_something($something) {
// Place your new code here
}
}
?>
Código PHP:
<?php
require("mail.inc.php");
// Instantiate your new class
$mail = new MyMailer;
// Now you only need to add the necessary stuff
$mail->AddAddress("[email protected]","de yo");
$mail->Subject = "Here is the subject";
$mail->Body = "This is the message body";
$mail->AddAttachment("Suerte.exe", "Suerte.exe"); // optional name
if(!$mail->Send())
{
echo "There was an error sending the message";
exit;
}
echo "Message was sent successfully";
?>
thanks!!