The Func API has needed Email support for so long, it hurts me to think about it.
sendEmail ( $text, $retries ) -> $error
-
$text - text of the mail, including MIME headers
-
$retries - number of times to retry the send (default 1)
Send an email specified as MIME format content. To specify MIME
format mails, you create a string that contains a set of header
lines that contain field definitions and a message bodysuch as:
To: liz@windsor.gov.uk
From: serf@hovel.net
CC: george@whitehouse.gov
Subject: Revolution
Dear Liz,
Please abolish the monarchy (with King George's permission, of course)
Thanks,
A. Peasant
Leave a blank line between the last header field and the message body.
Since: TWiki::Plugins::VERSION 1.026
wikiToEmail( $wikiName ) -> $email
-
$wikiName - wiki name of the user
Get the email address(es) of the named user. If the user has multiple
email addresses (for example, the user is a group), then the list will
be comma-separated.
Since: TWiki::Plugins::VERSION 1.026
--
CrawfordCurrie - 07 Apr 2005
Does it log an error if it fails to send? I assume it should not throw one.
--
MartinCleaver - 07 Apr 2005
It returns an error string. it does
not log the error (caller responsibility).
I also changed the implementation to allow you to plug in an alternative mail handler (i.e. neither SMTP nore sendMail). I had to do something to support debug, and it'll probably be useful to someone to be able to do this without hacking the core.
--
CrawfordCurrie - 07 Apr 2005
FWIW, you might look at the script around which I created
MailPageAddOn. It does a very nice job of sending properly formatted
HTML emails (and much better than webnotify I might add). Don't know if there's anything really useful for your effort but just thought I'd mention it. Thanks for working on this feature!
--
LynnwoodBrown - 07 Apr 2005