From 5fb1bc16aeff1e42a6e92045e0bf88dc8c034e39 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Wed, 12 Mar 2025 22:57:40 +0000 Subject: email: Add accessors for common header fields. * email/email.scm (sanitize-field): New function. (email-from, email-to, email-cc, email-bcc, email-subject, email-date, email-message-id, email-content-type): New public functions. * doc/guile-email.texi (Data Types): Document them. --- doc/guile-email.texi | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/guile-email.texi b/doc/guile-email.texi index 72d8ee3..b359af4 100644 --- a/doc/guile-email.texi +++ b/doc/guile-email.texi @@ -3,7 +3,7 @@ @settitle guile-email @copying -Copyright @copyright{} 2019, 2021 Arun Isaac@* +Copyright @copyright{} 2019, 2021, 2025 Arun Isaac@* Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -114,6 +114,18 @@ This is the data type representing emails. Predicate and field accessors for the @code{} data type. @end deffn +@deffn {Scheme Procedure} email-from email +@deffnx {Scheme Procedure} email-to email +@deffnx {Scheme Procedure} email-cc email +@deffnx {Scheme Procedure} email-bcc email +@deffnx {Scheme Procedure} email-subject email +@deffnx {Scheme Procedure} email-date email +@deffnx {Scheme Procedure} email-message-id email +@deffnx {Scheme Procedure} email-content-type email +Accessors for specific headers in @var{email}. Prefer these to +@code{email-headers} when possible. +@end deffn + @deffn {Scheme Procedure} make-email headers body Construct an @code{} object. @var{headers} is an association list of email headers. @var{body} is either a string or a list of -- cgit v1.2.3