hi,
I am new to modx.
I am using xamp in win2000.
I want to use the class.phpmailer.php for sending mail.
I go through the links and material in the forum.
I created a snippet named [[abc]]
copied the code from
http://phpmailer.sourceforge.net/tutorial.html
<?php
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = "smtp.localhost"; // SMTP server
$mail->From = "
[email protected]";
$mail->AddAddress("
[email protected]");
$mail->Subject = "First PHPMailer Message";
$mail->Body = "Hi! \n\n This is my first e-mail sent through PHPMailer.";
$mail->WordWrap = 50;
if(!$mail->Send())
{
echo ’Message was not sent.’;
echo ’Mailer error: ’ . $mail->ErrorInfo;
}
else
{
echo ’Message has been sent.’;
}
?>
The above code is making Following error .
« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
PHP error debug
Error: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: そのようなホストは不明です。
Error type/ Nr.: Warning - 2
File: C:\Program Files\xampp\htdocs\modx\manager\includes\controls\class.smtp.php
Line: 105
Line 105 source: $tval); # give up after ? secs
Parser timing
MySQL: 0.0684 s (9 Requests)
PHP: 2.6878 s
Total: 2.7562 s
i am unable to find a solution for this.
Please help me