8 sendmail: Sending E-Mail
(require net/sendmail) | package: net-lib |
All strings used in mail messages are assumed to conform to their corresponding SMTP specifications, except as noted otherwise.
8.1 Sendmail Functions
procedure
(send-mail-message/port from subject to cc bcc extra-header ...) → output-port? from : (or/c string? false/c) subject : string? to : (listof string?) cc : (listof string?) bcc : (listof string?) extra-header : string?
Note that passing already-quoted strings would be fine, since then there are no non-ASCII characters.
The return value is an output port into which the client must write the message. Clients are urged to use close-output-port on the return value as soon as the necessary text has been written, so that the sendmail process can complete.
The from argument can be any value; of course, spoofing should be used with care. If it is #f, no “From:” header is generated, which usually means that your sendmail program will fill in the right value based on the user.
procedure
(send-mail-message from subject to cc bcc body extra-header ...) → void? from : string? subject : string? to : (listof string?) cc : (listof string?) bcc : (listof string?) body : (listof string?) extra-header : string?
Lines that contain a single period do not need to be quoted.
8.2 Sendmail Unit
sendmail@ and sendmail^ are deprecated. They exist for backward-compatibility and will likely be removed in the future. New code should use the net/sendmail module.
(require net/sendmail-unit) | package: compatibility-lib |
value
sendmail@ : unit?
8.3 Sendmail Signature
(require net/sendmail-sig) | package: compatibility-lib |
signature
sendmail^ : signature
Includes everything exported by the net/sendmail module.