Connect. Communicate. Collaborate. Securely.

Home » Kerio User Forums » Kerio Connect » PHP mail() associate with Kerio connect 7.1.x

Messages: 35
Karma: 0
Send a private message to this user

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_>', 'My Subject', $message)

but it seems work for outside, not work on internal Kerio Connect.

Any help, thanks.


Messages: 271
Karma: 5
Send a private message to this user
I would recommend you to take a look at PEAR.

Messages: 35
Karma: 0
Send a private message to this user

PHPmailer has simple structure, but I am afraid PEAR is more complicated.

Below is phpmailer testing code:

// PHPMailer
$mail = new PHPMailer();
$mail->IsSMTP(); // send via SMTP
$mail->Host = ""; // 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()
$mail->AddAddress("to2<_at_>"); // optional name


// $mail->AddAttachment()
$mail->AddAttachment("path_to/file"); // attachment
$mail->AddAttachment("path_to_file2", "INF");

$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";


Messages: 15
Karma: 0
Send a private message to this user
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 =
to be
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
Previous Topic: Kerio Connector for BlackBerry will be discontinued.....
Next Topic: iCal does not show any Calendar items
Goto Forum:

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 information.

Current Time: Fri Oct 20 03:14:34 CEST 2017

Total time taken to generate the page: 0.00410 seconds
.:: Contact :: Home ::.
Powered by: FUDforum 3.0.4.