Reply to using phpMailer

Your name:

Reply:


Posted by Kevin Raleigh on 07/07/07 19:38

I would like to use the phpMailer.
Haven't used it before but I am told that it is the way to go.
Anyway does anyone have any experience using the phpMailer

What I have done thus far is to load the files to my server and include them
into the php.ini file. this part works fine.

But when I call the file mailTest.php "see code below" it sends this error:
Warning: fsockopen() expects parameter 2 to be long, string given in
/home/content/r/a/l/raleigh123/html/php/class.smtp.php on line 105
Message could not be sent.
Mailer Error: Language string failed to load: connect_host



Now when I contacted my provider godaddy.com for information they told me
that I had to use this string in my code in place of the username and
password: ( relay-hosting.secureserver.net ) minus the parenthesis of
course. However I don't know where to put this piece of information into the
phpMailer code.

I scanned the class.smtp file and the class.phpMailer file but couldn't find
anywhere that the information would fit.

I am using one of the test scripts that come with phpMailer:


<?php
require("class.phpmailer.php");

$mail = new PHPMailer();

$mail->IsSMTP();

// set mailer to use SMTP
$mail->Host = "http://www.mysite.org";
//relay-hosting.secureserver.net

// specify main and backup server
$mail->SMTPAuth = true; // turn on SMTP authentication


$mail->Username = "jondoe"; // SMTP username
$mail->Password = "ADeer"; // SMTP password

$mail->From = "from@example.com";
$mail->FromName = "Mailer";
$mail->AddAddress("mysite@site.com", "Kevin Raleigh");
//$mail->AddAddress("ellen@example.com");

// name is optional
//$mail->AddReplyTo("info@example.com", "Information");

$mail->WordWrap = 50;

// set word wrap to 50 characters
//$mail->AddAttachment("/var/tmp/file.tar.gz");

// add attachments
//$mail->AddAttachment("/tmp/image.jpg", "new.jpg");

// optional name
$mail->IsHTML(true);

// set email format to HTML

$mail->Subject = "Here is the subject";
$mail->Body = "This is the HTML message body <b>in bold!</b>";
$mail->AltBody = "This is the body in plain text for non-HTML mail clients";

if(!$mail->Send())
{
echo "Message could not be sent. <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}

echo "Message has been sent again";
?>

Can anyone advise me on how to work with phpMailer
Your insights would be greatly appreciated

thank you

Kevin

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация