Re: PHP SMTP Mailers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Jan G. B., You got me over the first hump.

I'm having programs installing pear on my VISTA localhost...
So, I uploaded the Mail folder and Mail.php file to my
Shared Hosting ISP. I do not think pear is provided.

The Testing is as follows:

<?php

require_once "Mail.php";

// SSL HOST
$host = "ssl://smtp.gmail.com";
$port = "587";
$username = "Sender@xxxxxxxxx";
$password = "Password";
$from = "King Coffee <Sender@xxxxxxxxx>";
$to = "Bill <Recipient@xxxxxxxxxxx>";
$subject = "PHP Mail Test";
$body = "This is a simple mail test!";

$headers = array('From' => $from,
'To' => $to,
'Subject' => $subject);

$smtp = Mail::factory('smtp',
array('host' => $host,
'port' => $port,
'auth' => true,
'username' => $username,
'password' => $password));

$mail = $smtp->send($to, $header, $body);

if(PEAR::isError($mail)) {
	echo( "<p>" . $mail->getMessage() . "</p>");
} else {
	echo("<p>Message successfully sent</p>");
}

?>

<html>
<head>
<title>PHP EMAIL TESTER</title>
<h1>This is a test</h1>
<?php Echo "Hi King"; ?>
</head>
</html>

When I run the server page, The following error is displayed:

Warning: require_once(PEAR.php) [function.require-once]: failed to open stream: No such file or directory in D:\Hosting\ID#\html\auction\Mail.php on line 46

Fatal error: require_once() [function.require]: Failed opening required 'PEAR.php' (include_path='.;C:\php5\pear') in D:\Hosting\ID#\html\auction\Mail.php on line 46

I will be still trying the get pear installed in VISA, but meanwhile, how can I obtain the PEAR.php and supporting files to upload?

Thanks,
King

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux