Dear Jason,
Thank you so much, that got rid of the errors correctly. I am still having trouble. I have tested and am apple to send using my smtp credentials on port 25. The emails send and received correctly, but if I use port 465 which is the one I need to use the email does not get sent and the script takes a long time to execute with no results. I am using Amazon's SES with SMTP credentials. I have tested the SMTP information on my local system and they are working. I have also tested them on the server using this simple script that sends using Pear Mail. You can see below:
<?php
require_once "Mail.php";
$from = "Sandra Sender <sender@example.com>";
$to = "Ramona Recipient <recipient@example.com>";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
$host = "ssl://mail.example.com";
$port = "465";
$username = "smtp_username";
$password = "smtp_password";
$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, $headers, $body);
if (PEAR::isError($mail)) {
echo("<p>" . $mail->getMessage() . "</p>");
} else {
echo("<p>Message successfully sent!</p>");
}
?>
I am happy to send the Amazon SMTP information privately if that would help. Many thanks again for your help.