utils-procs.tcl

Helper procs to build email messages

Location:
packages/acs-mail-lite/tcl/utils-procs.tcl
Created:
2007-12-16
Author:
Emmanuelle Raffenne <eraffenne@gmail.com>
CVS Identification:
$Id: utils-procs.tcl,v 1.9.2.4 2023/03/24 16:02:27 antoniop Exp $

Procedures in this file

Detailed information

acs_mail_lite::utils::build_body (private)

 acs_mail_lite::utils::build_body [ -mime_type mime_type ] \
    [ -charset charset ] body

Encode the body using quoted-printable and build the alternative part if necessary Return a list of message tokens

Switches:
-mime_type (optional, defaults to "text/plain")
-charset (optional, defaults to "UTF-8")
Parameters:
body (required)

Testcases:
No testcase defined.

acs_mail_lite::utils::build_date (private)

 acs_mail_lite::utils::build_date [ date ]

Depending on the available mime package version, it uses either the mime::parsedatetime to do it or local code (parsedatetime is buggy in mime < 1.5.2 )

Parameters:
date (optional)
A 822-style date-time specification "YYYYMMDD HH:MI:SS"

Testcases:
No testcase defined.

acs_mail_lite::utils::build_subject (private)

 acs_mail_lite::utils::build_subject [ -charset charset ] subject

Encode the subject, using quoted-printable, of an email message and trim long lines. Depending on the available mime package version, it uses either the mime::word_encode proc to do it or local code (word_encode is buggy in mime < 1.5.2 ) A purely tcllib based version would be [mime::word_encode utf-8 quoted-printable $subject] but that would miss the safety-belt for newline handling

Switches:
-charset (optional, defaults to "UTF-8")
Parameters:
subject (required)

Testcases:
No testcase defined.

acs_mail_lite::utils::valid_email_p (private, deprecated)

 acs_mail_lite::utils::valid_email_p email
Deprecated. Invoking this procedure generates a warning.

Checks if the email is valid. Uses mime::parsemail to determine this

Parameters:
email (required)
Returns:
boolean success DEPRECATED: duplicated by util_email_valid_p
See Also:

Testcases:
No testcase defined.
[ show source ]