Permalink
Browse files

[cleanup] SmtpServer: cleanup

  • Loading branch information...
1 parent 98101f0 commit 9302e5d89e312d140d08af8a63c21d312fa2c679 @Aqua-Ye Aqua-Ye committed Jan 2, 2012
Showing with 21 additions and 5 deletions.
  1. +21 −5 stdlib/web/mail/server.opa
@@ -1,3 +1,21 @@
+/*
+ Copyright © 2011, 2012 MLstate
+
+ This file is part of OPA.
+
+ OPA is free software: you can redistribute it and/or modify it under the
+ terms of the GNU Affero General Public License, version 3, as published by
+ the Free Software Foundation.
+
+ OPA is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with OPA. If not, see <http://www.gnu.org/licenses/>.
+*/
+
type SmtpServer.failure = {dont_exist}
/ {undisponible}
/ {stopped}
@@ -11,8 +29,9 @@ type SmtpServer.result = { success }
type SmtpServer.handler = string, list(string), string -> SmtpServer.result
SmtpServer= {{
- @private
- init_server = %% BslMail.Mailserver.init_server %%
+
+ @private init_server = %% BslMail.Mailserver.init_server %%
+
start(ip : ip ,port : int, ssl : option(SSL.secure_type), handler : SmtpServer.handler)=
new_handler(f,t,c) = match handler(f,t,c) with
| {success} -> (250,"done!")
@@ -29,7 +48,4 @@ SmtpServer= {{
init_server(port, IPv4.string_of_ip(ip), st, new_handler)
-
-
-
}}

0 comments on commit 9302e5d

Please sign in to comment.