Php send example

Php send example

Can you give me a fulle example of php working script
I tried a couple of examples but none worked
Thank you
<?php require_once "Mail.php";  
$from = "Sandra Sender < xxxx@ambalajedeflori.ro>"; 
$to = "Ramona Recipient < xxxx@gmail.com>"; 
$subject = "Hi!"; $body = "Hi,\n\nHow are you?";  
$host = "smtp.zoho.com";
 $port = "465"; 
$username = " xxx@ambalajedeflori.ro"; 
$password = "xxxx";  
$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>");  } ?>