package ocsigen-start

Build not yet checked
  1. Overview
  2. Docs
Higher-level library for developing Web and mobile applications with users, registration, notifications, etc

Install

dune-project
 Dependency

Authors

Maintainers

Sources

9.0.0.tar.gz
md5=dfd00a648f0d5f64fcfc893427afc996
sha512=d7c77a9f9b617291ea8c49f4e77fcad8187c39e41d6cb2942ad1c8f45ba620ac261d25a3e75c1b2ce1fd429dad009abb45fab670542e722ab336dc681b99330a

doc/ocsigen-start.server/Os/Email/index.html

Module Os.Email

Basic module for sending e-mail messages to users, using some local sendmail program.

val set_from_addr : (string * string) -> unit

set_from_addr (sender_name, sender_email) sets the email address used to send mail to sender_email and the sender name to sender_name.

val set_mailer : string -> unit

set_mailer mailer sets the name of the external sendmail program on your system, used by the default send function.

val get_mailer : unit -> string

get_mailer () returns the name of mailer program.

val email_pattern : string

The pattern used to check the validity of an e-mail address.

val is_valid : string -> bool

is_valid email returns true if the e-mail address email is valid. Else it returns false.

val send : ?url:string -> ?from_addr:(string * string) -> to_addrs:(string * string) list -> subject:string -> string list -> unit Lwt.t

Send an e-mail to to_addrs from from_addr. You have to define the subject of your email. The body of the email is a list of strings and each element of the list is automatically separated by a new line. Tuples used by from_addr and to_addrs is of the form (name, email).

val set_send : (?url:string -> from_addr:(string * string) -> to_addrs:(string * string) list -> subject:string -> string list -> unit Lwt.t) -> unit

Customize email sending function. See send for more details about the arguments.