archive_me1Add my vote for this tag create new tag
, view all tags
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)


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

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2008-08-28 - TWikiJanitor
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.