Next: , Previous: Mailbox Functions, Up: libmu_scm


3.3.3 Message Functions

— Scheme procedure: mu-message-create

Creates an empty message.

— Scheme procedure: mu-message-copy mesg

Creates the copy of the message mesg.

— Scheme procedure: mu-message-destroy mesg

Destroys the message mesg.

— Scheme procedure: mu-message-set-header mesg header value replace

Sets new value to the header header of the message mesg. If header is already present in the message its value is replaced with the suplied one iff the optional replace is #t. Otherwise, a new header is created and appended.

— Scheme procedure: mu-message-get-size mesg

Returns the size of the message mesg .

— Scheme procedure: mu-message-get-lines mesg

Returns number of lines in the given message.

— Scheme procedure: mu-message-get-sender mesg

Returns email address of the sender of the message mesg.

— Scheme procedure: mu-message-get-header mesg header

Returns value of the header header from the message mesg.

— Scheme procedure: mu-message-get-header-fields mesg headers

Returns the list of headers in the message mesg. Optional argument headers gives a list of header names to restrict return value to.

— Scheme procedure: mu-message-set-header-fields mesg list replace

Set the headers in the message mesg from list list is a list of conses (cons HEADER VALUE). The function sets these headers in the message mesg. Optional parameter replace specifies whether the new header values should replace the headers already present in the message.

— Scheme procedure: mu-message-delete mesg flag

Mark the message mesg as deleted. Optional argument flag allows to toggle deletion mark. The message is deleted if it is #t and undeleted if it is #f

— Scheme procedure: mu-message-get-flag mesg flag

Return value of the attribute flag of the message mesg.

— Scheme procedure: mu-message-set-flag mesg flag value

Set the attribute flag of the message mesg. If optional value is #f, the attribute is unset.

— Scheme procedure: mu-message-get-user-flag mesg flag

Return the value of the user attribute flag from the message mesg.

— Scheme procedure: mu-message-set-user-flag mesg flag value

Set the given user attribute flag in the message mesg. If optional argumen value is ‘#f’, the attribute is unset.

— Scheme procedure: mu-message-get-port mesg mode full

Returns a port associated with the given mesg. mode is a string defining operation mode of the stream. It may contain any of the two characters: ‘r’ for reading, ‘w’ for writing. If optional argument full is specified, it should be a boolean value. If it is ‘#t’ then the returned port will allow access to any part of the message (including headers). If it is #f then the port accesses only the message body (the default).

— Scheme procedure: mu-message-get-body mesg

Returns the message body for the message mesg.

— Scheme procedure: mu-message-multipart? mesg

Returns #t if mesg is a multipart MIME message.

— Scheme procedure: mu-message-get-num-parts mesg

Returns number of parts in a multipart MIME message. Returns #f if the argument is not a multipart message.

— Scheme procedure: mu-message-get-part mesg part

Returns part #part from a multipart MIME message mesg.

— Scheme procedure: mu-message-send mesg mailer from to

Sends the message mesg. Optional mailer overrides default mailer settings in mu-mailer. Optional from and to give sender and recever addresses.

— Scheme procedure: mu-message-get-uid mesg

Returns uid of the message mesg

— Scheme procedure: mu-body-read-line body

Read next line from the body.

— Scheme procedure: mu-body-write body text

Append text to message body.