The smtp4cl Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The smtp4cl Reference Manual

This is the smtp4cl Reference Manual, generated automatically by Declt version 2.4 "Will Decker" on Wed Jun 20 12:35:28 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

A simple Common Lisp library to send mail via SMTP.

To use simply do

  (asdf:oos 'asdf:load-op :smtp4cl)

and read the source code.


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 smtp4cl

Maintainer

Walter C. Pelissero <walter@pelissero.de>

Author

Walter C. Pelissero <walter@pelissero.de>

License

Lesser General Public License

Description

SMTP4CL an SMTP library for Common Lisp

Long Description

SMTP4CL is a library for Common Lisp to send e-mail using the SMTP protocol.

Dependencies
Source

smtp4cl.asd (file)

Component

smtp.lisp (file)


Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 smtp4cl.asd

Location

smtp4cl.asd

Systems

smtp4cl (system)

Packages

smtp4cl-system


Previous: , Up: Lisp files   [Contents][Index]

3.1.2 smtp4cl/smtp.lisp

Parent

smtp4cl (system)

Location

smtp.lisp

Packages

smtp4cl

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

4.1 smtp4cl-system

Source

smtp4cl.asd

Use List

Previous: , Up: Packages   [Contents][Index]

4.2 smtp4cl

Source

smtp.lisp (file)

Nickname

smtp

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Special variables

Special Variable: *smtp-debug*

Either nil (no debug output is performed), t (*standard-output*) or an output stream

Package

smtp4cl

Source

smtp.lisp (file)

Special Variable: *smtp-port*

The SMTP port number. Normally 25.

Package

smtp4cl

Source

smtp.lisp (file)

Special Variable: *smtp-server*

Name of the default SMTP server to be used to send email messages.

Package

smtp4cl

Source

smtp.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Macros

Macro: with-smtp-connection (VAR &rest KEYS) &body BODY

Execute BODY within the lexical scope of VAR which is bound to a socket connected to a SMTP server. KEYS arguments are those supported by CALL-WITH-SMTP-CONNECTION.

Package

smtp4cl

Source

smtp.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.3 Functions

Function: call-with-smtp-connection PROC &key SERVER PORT

Make that initial connection to the mail SERVER returning a socket connected to it and signaling an error if it can’t be made

Package

smtp4cl

Source

smtp.lisp (file)

Function: feed-smtp-server-with-message SOCK FROM RECIPIENTS MESSAGE
Package

smtp4cl

Source

smtp.lisp (file)

Function: send-message FROM TO MESSAGE-BODY &key CC BCC SUBJECT REPLY-TO HEADERS SERVER PORT

Sends a message via the mail SERVER. FROM is the address to be given as the sender. TO can be a string or a list of strings naming recipients.

MESSAGE-BODY is the message to be sent; it can be a string, or anything else that can be promoted to a MIME-PART; it should not contain headers.
CC and BCC can either be a string or a list of strings
naming recipients. All CCs and BCCs are sent the message
but the BCCs aren’t included in the message header.
REPLY-TO’s value is a string and, if present, a Reply-To header will be created.
HEADERS is an alist of symbol and strings. These are header lines added to the header build to be sent out.
Example:
((:x-foo . "bar") (:x-friends . "foo bar foobar"))

Package

smtp4cl

Source

smtp.lisp (file)

Function: send-via-smtp FROM RECIPIENTS MESSAGES &key SERVER PORT

This is the low level version of ‘SEND-MESSAGE’. It doesn’t build a header, so MESSAGES should contain one (if not then the MTA may build one for you). Each message in MESSAGES can be a string, a pathname or an input-stream. RECIPIENTS is a list of strings and each string should be in RFC822 format ("foo@bar.com")

Package

smtp4cl

Source

smtp.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.4 Generic functions

Generic Function: make-stream-from OBJECT
Package

smtp4cl

Source

smtp.lisp (file)

Methods
Method: make-stream-from (OBJECT mime-part)
Method: make-stream-from (OBJECT stream)
Method: make-stream-from (OBJECT pathname)
Method: make-stream-from (OBJECT string)
Generic Function: write-message-to-smtp-server MESSAGE SOCKET
Package

smtp4cl

Source

smtp.lisp (file)

Methods
Method: write-message-to-smtp-server MESSAGE SOCKET

Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Special variables

Special Variable: +mailer-name+
Package

smtp4cl

Source

smtp.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Macros

Macro: with-input-from (VAR OBJECT) &body BODY

Generalized macro to read from objects of different types. OBJECT can be anything that has a MAKE-STREAM-FROM defined on. VAR is bound to an input stream from OBJECT and execute BODY in that lexical scoping. On exit of this block the stream is closed.

Package

smtp4cl

Source

smtp.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Functions

Function: expect STREAM CODE &optional ERROR-MSG

Wait for a result CODE from STREAM and generate an ERROR-MSG error if we receive something else

Package

smtp4cl

Source

smtp.lisp (file)

Function: smtp-command STREAM &rest FORMAT-ARGS

Send a command to the SMTP server. Command is built using FORMAT-ARGS

Package

smtp4cl

Source

smtp.lisp (file)

Function: smtp-command-or-fail STREAM EXPECTED-RESULT-CODE &rest FORMAT-ARGS

Send through stream the SMTP command specified by FORMAT-ARGS which are formatted, guess, how, with FORMAT. Generate an error if the SMTP command didn’t yield the EXPECTED-RESULT-CODE

Package

smtp4cl

Source

smtp.lisp (file)

Function: wait-for-response STREAM

Read the response of the smtp server, collect it in a string. Return three values: response-class whole-response-string response-code

Package

smtp4cl

Source

smtp.lisp (file)

Function: write-crlf STREAM

Terminate a line according to SMTP protocol. That is, with a CR-LF

Package

smtp4cl

Source

smtp.lisp (file)

Function: write-smtp-line LINE STREAM
Package

smtp4cl

Source

smtp.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   S  
Index Entry  Section

F
File, Lisp, smtp4cl.asd: The smtp4cl<dot>asd file
File, Lisp, smtp4cl/smtp.lisp: The smtp4cl/smtp<dot>lisp file

L
Lisp File, smtp4cl.asd: The smtp4cl<dot>asd file
Lisp File, smtp4cl/smtp.lisp: The smtp4cl/smtp<dot>lisp file

S
smtp4cl.asd: The smtp4cl<dot>asd file
smtp4cl/smtp.lisp: The smtp4cl/smtp<dot>lisp file

Jump to:   F   L   S  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   C   E   F   G   M   S   W  
Index Entry  Section

C
call-with-smtp-connection: Exported functions

E
expect: Internal functions

F
feed-smtp-server-with-message: Exported functions
Function, call-with-smtp-connection: Exported functions
Function, expect: Internal functions
Function, feed-smtp-server-with-message: Exported functions
Function, send-message: Exported functions
Function, send-via-smtp: Exported functions
Function, smtp-command: Internal functions
Function, smtp-command-or-fail: Internal functions
Function, wait-for-response: Internal functions
Function, write-crlf: Internal functions
Function, write-smtp-line: Internal functions

G
Generic Function, make-stream-from: Exported generic functions
Generic Function, write-message-to-smtp-server: Exported generic functions

M
Macro, with-input-from: Internal macros
Macro, with-smtp-connection: Exported macros
make-stream-from: Exported generic functions
make-stream-from: Exported generic functions
make-stream-from: Exported generic functions
make-stream-from: Exported generic functions
make-stream-from: Exported generic functions
Method, make-stream-from: Exported generic functions
Method, make-stream-from: Exported generic functions
Method, make-stream-from: Exported generic functions
Method, make-stream-from: Exported generic functions
Method, write-message-to-smtp-server: Exported generic functions

S
send-message: Exported functions
send-via-smtp: Exported functions
smtp-command: Internal functions
smtp-command-or-fail: Internal functions

W
wait-for-response: Internal functions
with-input-from: Internal macros
with-smtp-connection: Exported macros
write-crlf: Internal functions
write-message-to-smtp-server: Exported generic functions
write-message-to-smtp-server: Exported generic functions
write-smtp-line: Internal functions

Jump to:   C   E   F   G   M   S   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *   +  
S  
Index Entry  Section

*
*smtp-debug*: Exported special variables
*smtp-port*: Exported special variables
*smtp-server*: Exported special variables

+
+mailer-name+: Internal special variables

S
Special Variable, *smtp-debug*: Exported special variables
Special Variable, *smtp-port*: Exported special variables
Special Variable, *smtp-server*: Exported special variables
Special Variable, +mailer-name+: Internal special variables

Jump to:   *   +  
S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   P   S  
Index Entry  Section

P
Package, smtp4cl: The smtp4cl package
Package, smtp4cl-system: The smtp4cl-system package

S
smtp4cl: The smtp4cl system
smtp4cl: The smtp4cl package
smtp4cl-system: The smtp4cl-system package
System, smtp4cl: The smtp4cl system

Jump to:   P   S