ZOHO Form Mail

This is PHP form mail script for Linux server where mail ids are configured with ZOHO Mail. test@yourdomain.com is your ZOHO Mail ID and Passsword its password

require_once "Mail.php";
$from = "Sandra Sender <test@yourdomain.com>";
$to = "Ramona Recipient <test2@yourdomain.com>";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
$host = "smtp.zoho.com";
$port = "587";
$username = "test@yourdomain.com";
$password = "1234";
$headers = array ('From' => $from,
  'To' => $to,
  'Subject' => $subject);
$smtp = Mail::factory('smtp',
  array ('host' => $host,
    'auth' => true,
 'port' => $port,
    'username' => $username,
    'password' => $password));
$mail = $smtp->send($to, $headers, $body);
if (PEAR::isError($mail)) {
" . $mail->getMessage() . "

 } else {
Message successfully sent!

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Form Mail .net

In web.config File   <system.net>    <mailSettings>      <smtp>...

Form Mail php for Windows Server

This is php form mail script for Windows server which mail ids configure with your own Hosting...

PHP Form Mail For Linux Server using SMTP authentication

Send Email from a PHP Script Using SMTP AuthenticationTo connect to an outgoing SMTP server from...