On Mon, 5 Aug 2013 20:01:12 +0200 Stephan Beal <[email protected]> wrote:
> On Mon, Aug 5, 2013 at 4:10 PM, Mark Janssen <[email protected]> wrote: > > > Fossil has built in RSS feeds with the granularity to only show ticket > > changes. > > > > Historical anecdote: that feature was originally proposed/implemented only > recently (February) by David Given. When he first suggested it, it was a > "facepalm" moment for me - i couldn't believe nobody had suggested it > before. > > http://fossil-scm.org/index.html/timeline?r=timeline-rss-ticket > > > > > You can achieve this by combining the "If feed matches" trigger with the > > email action. You can adapt the recipe at https://ifttt.com/recipes/109526 > > for > > your needs. > > > > Very nice :). Would it be possible to get a copy somewhere which doesn't > require a login? How about a Fossil doc/wiki page about how to do it? You can use a tiny tcl script for send mail, create a char * with the script, modify the char * with running values and use the tcllib mime and smtp packages for mail sending. It needs build fossil with tcl support. In the script below I have deleted sensible data (signatures, servers, mails, names), it should work fine. static const char zDiffScript[] = @ package require mime 1.5.6 @ package require smtp 1.4.5 @ proc send_simple_message {recipient email_server subject body} { @ package require smtp @ package require mime @ set token [mime::initialize -canonical text/plain -string $body] @ mime::setheader $token Subject $subject @ smtp::sendmessage $token -recipients $recipient -servers $email_server @ mime::finalize $token @ } @ send_simple_message /* ** Copy and modified from diffcmd.c diff_tk ** ** Sends a mail to recipients using email_server */ void send_mail_tk(const char *zRecipient, // To: [email protected] const char *zEmail_server, // Server dns: localhost const char *zSubject, // Subject: About the message const char *zBody // Body: Main Message Body ){ int i; Blob script; char *zTempFile; char *zCmd; blob_zero(&script); blob_appendf(&script, zDiffScript, " %s %s %s %s", zRecipient, zEmail_server, zSubject, zBody); zTempFile = write_blob_to_temp_file(&script); zCmd = mprintf("tclsh \"%s\"", zTempFile); fossil_system(zCmd); file_delete(zTempFile); fossil_free(zCmd); } --- --- Eduardo Morras <[email protected]> _______________________________________________ fossil-users mailing list [email protected] http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

