Connect. Communicate. Collaborate. Securely.

Home » Kerio User Forums » Kerio Connect » PHP Mail Server
  •  
mathiasp

Messages: 5
Karma: 0
Send a private message to this user
Hi, I want to send a mail with PHP using Kerio MailServer. This is my code:
<?php
mail("*****<_at_>hotmail.com","subject","me...
?>

But when I try that, it says:

Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Relaying to <****<_at_>hotmail.com> denied (authentication required) in C:\wamp\www\mail.php on line 2

Do I need to edit some settings in php.ini, or some other Kerio files? If so, can anyone please help me?
  •  
ICT and Me

Messages: 940

Karma: 53
Send a private message to this user
1. Is your webserver in the same range as your connect?
2. Your php.ini could have the setting secure or must authenticate.
3. Try Relay setting in Connect to allow relay. If this is working then look within the log why it's sending know. With what kind of sending parameters.

ICT and Me
Carlo Turk
The Netherlands
www.ictandme.nl
  •  
marook

Messages: 520

Karma: 3
Send a private message to this user
The warning tells you that the SMTP needs Authentication!
Do so, or add your PHP site to the IP group that does not need authentication.

Regards,

Jakob Peterhänsel
Consultant - Humac A/S

Apple Certified Support Professional (ACSP)
Apple Certified Technical Coordinator (ACTC)
AppleSeed/CQF member since 1998
Kerio Messaging Partner
  •  
TorW

Messages: 769
Karma: 9
Send a private message to this user
Or better yet: make the script authenticate. Opening up relaying from a webserver is asking for trouble.
  •  
mathiasp

Messages: 5
Karma: 0
Send a private message to this user
Thanks for your replies! So I could use a code like this?
<?php
include("mail.php");
/* mail setup recipients, subject etc */
$recipients = "to<_at_>hotmail.com";
$headers["From"] = "to<_at_>hotmail.com";
$headers["To"] = "to<_at_>hotmail.com";
$headers["Subject"] = "User feedback";
$mailmsg = "Hello, This is a test.";
/* SMTP server name, port, user/passwd */
$smtpinfo["host"] = "smtp.mycorp.com"; // **what exactly is this?**
$smtpinfo["port"] = "25";
$smtpinfo["auth"] = true;
$smtpinfo["username"] = "myUserName"; //?
$smtpinfo["password"] = "myPassword"; //?
/* Create the mail object using the Mail::factory method */
$mail_object =& Mail::factory("smtp", $smtpinfo);
/* Ok send mail */
$mail_object->send($recipients, $headers, $mailmsg);
?>
  •  
GlennK

Messages: 252
Karma: 3
Send a private message to this user
I'm pretty certain there is a Kerio KB note on this. Do a search. It gives specific instructions on how to modify php.ini
  •  
mathiasp

Messages: 5
Karma: 0
Send a private message to this user
A Kerio KB, what? I'm sorry, I have absolutely no experience in this...
  •  
GlennK

Messages: 252
Karma: 3
Send a private message to this user
sorry, Knowledgebase. Check the Kerio knowledgebase. It is searchable. They have a tech note on it.
  •  
mathiasp

Messages: 5
Karma: 0
Send a private message to this user
Ah, alright. Thank you!
Previous Topic: Deleted Items Folder
Next Topic: Recovered items vs Recovering Space
Goto Forum:
  


Disclaimer:
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 Nov 24 08:41:25 CET 2017

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