I am writing php web page on Mac OS X server (server 1), Kerio connect also running on server 1, I would like to use PHP mail() functon on the webpage, how can I associate to Kerio connect so that I can send email to Kerio email account?
e.g. users fill out the web form, after submit, the message via PHP email() function to Kerio connect email account.
I know that PHP mail() is simple, just run:
mail('test<_at_>example.com', 'My Subject', $message)
but it seems work for outside, not work on internal Kerio Connect.
Any help, thanks.
I would recommend you to take a look at PEAR.
PHPmailer has simple structure, but I am afraid PEAR is more complicated.
Below is phpmailer testing code:
$mail = new PHPMailer();
$mail->IsSMTP(); // send via SMTP
$mail->Host = "smtp.server.com"; // SMTP servers
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "username"; // SMTP username
$mail->Password = "123456"; // SMTP password
$mail->From = "myemail@localhost";
$mail->FromName = "My Name";
$mail->AddAddress("to2<_at_>email.com"); // optional name
$mail->AddAttachment("path_to/file"); // attachment
$mail->IsHTML(true); // send as HTML
$mail->Subject = "testing email";
$mail->Body = "This is the <b>HTML body</b>";
$mail->AltBody = "This is the text-only body";
echo "Message was not sent <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
echo "Message has been sent";
You should be able to user PHP's mail() function with Kerio Mail Server.
All you need to do is to tell PHP, which sendmail tool to use.
Open your /etc/php.ini with a text editor (not Word) and edit the line
sendmail_path = /usr/local/kerio/sendmail
Restart the Web-Service and
PHP mail will then use Kerio Mail Server to deliver mails.
Note the Apple's Mail service must NOT be active on the server
Kerio discussion forums are intended for open communication between forum
members and may contain information and material posted by members which may
be useful in learning about Kerio products. The discussion forums are not
intended to provide technical support for any specific product. Any
information implied or expressed in the discussion forums is that of the
posting member. Kerio is in no way responsible for the information posted in
the forums, or its accuracy. Kerio employees may participate in the
discussions, but their postings do not represent an offical position of the
company on any issues raised or discussed. Kerio reserves the right to
monitor and maintain the forums to promote free and accurate exchange of