Skip to content
Browse files

Update the readme with a client example

  • Loading branch information...
1 parent 00ea91a commit 31642bd2b3263de09cd2e890e552b3ef1371ff66 @Vagabond committed Sep 4, 2009
Showing with 24 additions and 2 deletions.
  1. +24 −2 README.markdown
26 README.markdown
@@ -6,12 +6,34 @@ callback modules in the OTP style. The goal is to make it easy to send and
receive email in Erlang without the hassle of POP/IMAP. This is *not* a true
mailserver - although you could build one with it.
-The SMTP server supports PLAIN, LOGIN, CRAM-MD5 authentication as well as TLS.
+The SMTP server/client supports PLAIN, LOGIN, CRAM-MD5 authentication as well
+as STARTTLS and SSL (port 465).
Also included is a MIME encoder/decoder, sorta according to RFC204{5,6,7}.
Current Participants
+ Andrew Thompson (
-+ Jack Danger Canty (
++ Jack Danger Canty (
+Here's an example usage of the client:
+gen_smtp_client:send({"", [""],
+ "Subject: testing\r\nFrom: Andrew Thompson <>\r\nTo: Some Dude <>\r\n\r\nThis is the email body"},
+ [{relay, ""}, {username, ""}, {password, "mypassword"}]).
+The From and To addresses will be wrapped in &lt;&gt;s if they aren't already,
+TLS will be auto-negotiated if available (unless you pass `{tls, never}`) and
+authentication will by attempted by default since a username/password were
+specified (`{auth, never}` overrides this).
+If you want to mandate tls or auth, you can pass `{tls, always}` or `{auth,
+always}` as one of the options. You can specify an alternate port with `{port,
+2525}` (default is 25) or you can indicate that the server is listening for SSL
+connections using `{ssl, true}` (port defaults to 465 with this option).

0 comments on commit 31642bd

Please sign in to comment.
Something went wrong with that request. Please try again.