Quiero Ayuda con phpmailer
En mi pagina web estoy poniendo una opcion de contactar con el webmaster (yo) intente asi directamente pero siempre sale el OutlooK y yo quiero q vaya directamente a mi bandeja entonces lo q investige fue de phpmailer me lo descargue
cree asi ejemplo.php ( pagina)
y 2 los archivos de phpmailer los guarde en la carpeta phpmailer.
segun esta pagina hize las modificaciones para usarlo en gmail
http://deepakssn.blogspot.com/2006/06/gmail-php-send-email-using-php-with.html
a mi pagina ejemplo.php
le agregue
<?
require("phpmailer/class.phpmailer.php");
$mail = new PHPMailer()
IsSMTP(); // send via SMTP
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "[email protected]"; // SMTP username
$mail->Password = "contraseña"; // SMTP password
$webmaster_email = "[email protected]"; //Reply to this email ID
$email="[email protected]"; // Recipients email ID
$name="name"; // Recipient's name
$mail->From = $webmaster_email;
$mail->FromName = "Webmaster";
$mail->AddAddress($email,$name);
$mail->AddReplyTo($webmaster_email,"Webmaster");
$mail->WordWrap = 50; // set word wrap
$mail->AddAttachment("/var/tmp/file.tar.gz"); // attachment
$mail->AddAttachment("/tmp/image.jpg", "new.jpg"); // attachment
$mail->IsHTML(true); // send as HTML
$mail->Subject = "This is the subject";
$mail->Body = "Hi,
This is the HTML BODY "; //HTML Body
$mail->AltBody = "This is the body when user views in plain text format"; //Text Body
if(!$mail->Send())
{
echo "Mailer Error: " . $mail->ErrorInfo;
}
else
{
echo "Message has been sent";
}
?>
pero cuando lo abro me sale solo una pagina en blanco.. en pocas palabras no entiendo q hacer alguien me podria ayudar
cree asi ejemplo.php ( pagina)
y 2 los archivos de phpmailer los guarde en la carpeta phpmailer.
segun esta pagina hize las modificaciones para usarlo en gmail
http://deepakssn.blogspot.com/2006/06/gmail-php-send-email-using-php-with.html
a mi pagina ejemplo.php
le agregue
<?
require("phpmailer/class.phpmailer.php");
$mail = new PHPMailer()
IsSMTP(); // send via SMTP
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "[email protected]"; // SMTP username
$mail->Password = "contraseña"; // SMTP password
$webmaster_email = "[email protected]"; //Reply to this email ID
$email="[email protected]"; // Recipients email ID
$name="name"; // Recipient's name
$mail->From = $webmaster_email;
$mail->FromName = "Webmaster";
$mail->AddAddress($email,$name);
$mail->AddReplyTo($webmaster_email,"Webmaster");
$mail->WordWrap = 50; // set word wrap
$mail->AddAttachment("/var/tmp/file.tar.gz"); // attachment
$mail->AddAttachment("/tmp/image.jpg", "new.jpg"); // attachment
$mail->IsHTML(true); // send as HTML
$mail->Subject = "This is the subject";
$mail->Body = "Hi,
This is the HTML BODY "; //HTML Body
$mail->AltBody = "This is the body when user views in plain text format"; //Text Body
if(!$mail->Send())
{
echo "Mailer Error: " . $mail->ErrorInfo;
}
else
{
echo "Message has been sent";
}
?>
pero cuando lo abro me sale solo una pagina en blanco.. en pocas palabras no entiendo q hacer alguien me podria ayudar
