mail notifications

20 views
Skip to first unread message

Seba

unread,
Aug 13, 2011, 2:53:49 PM8/13/11
to TiddlyWiki
Hi,

Can anyone tell me if it is possible to setup automatic mail
notifications in tiddly with a plugin or a macro?

For example, certain action triggers mail notification sent to a
specific user.

Thank you.

regards,
seba

Yakov

unread,
Aug 13, 2011, 5:59:45 PM8/13/11
to TiddlyWiki
Hi Seba.

I'm not sure if I understand you in a right way but basically
standalone TiddlyWiki has no tools to send a mail. This can probably
be done in a plugin, but I can't provide any details since I don't
know what protocols are used for sending an email and what to do with
the sender. I mean, usually emails are send from a computer/server
which has an address and which can listen for responses. Anyway, I'm
close to be sure there are no such existing plugin.

However, you can search TiddlyTools [1] and other repositories (some
of them are listed in [2]).

[1] http://tiddlytools.com/
[2] open/reload TiddlyTools, and click the bookmarks tab in the
welcome tiddler.

Poul

unread,
Aug 14, 2011, 3:42:57 AM8/14/11
to TiddlyWiki
While I haven't yet implemented this particular feature in giewiki,
the Google App Engine hosting environment includes services that would
let me do so easily.

It should definitely be on my to-do list, I suppose - having so far
introduced mail integration only as a way to allow sending messages to
the author of a tiddler.

/Poul
http://giewiki.appspot.com | http://code.google.com/p/giewiki

Seba

unread,
Aug 14, 2011, 11:25:15 AM8/14/11
to TiddlyWiki
The thing is, I am setting up a project management tool using
cctiddly and I need the entire solution to run on my server. The only
thing that is bugging me is this email notification. When task is
assigned it would be great that a user would some sort of notification
rather than have to check their personal task screen.

On 14 avg., 09:42, Poul <poul.stauga...@gmail.com> wrote:
> While I haven't yet implemented this particular feature in giewiki,
> the Google App Engine hosting environment includes services that would
> let me do so easily.
>
> It should definitely be on my to-do list, I suppose - having so far
> introduced mail integration only as a way to allow sending messages to
> the author of a tiddler.
>
> /Poulhttp://giewiki.appspot.com|http://code.google.com/p/giewiki

skye riquelme

unread,
Aug 15, 2011, 2:07:53 PM8/15/11
to TiddlyWiki
Hi Seba

I have managed to do something like what you are asking, using a bit
of server-side php code. For example, in one TW, when a user enters
data for a new reference (using a html form).....on hitting the submit
botton, the information from the form is used 1/ to create and open a
new wiki, 2/ add that reference into a database (MySQL) and /3 sends
me am email notifying me of what just happened. Note that this TW is
not server-side...rather it sits in a shared Dropbox folder!

OK....the nitty gritty of the system is based on modifying Erics great
little Contact form - http://www.tiddlytools.com/#Contact

A very simple example, where a new tiddler, mysql entry and email is
generated as a result of a simple form - the tiddler has this code
---

<html><nowiki><form method=GET action="http://www.mydomain/
mailtext_tags.php" target=responseframe>
<input name="etiqueta" style="width:160px;" value="etiqueta"
onfocus="this.select()"><br>
<input type=hidden name="to" value ="skye@mydomain">
<input type=hidden name="assunto" value ="New Tag">
<input type=hidden name="script"
value="<script>config.options.txtTags=tiddler.title;refreshDisplay();</
script>">
<input type=hidden name="who">
<input type=hidden name="when">
<input name="linkedfrom" style="width:160px;" value="sub-etiqueta to"
onfocus="this.select()"><br>
<textarea name="text" rows="4" cols="44" onfocus="this.select()"></
textarea><br>
<input type="submit" value="Criar-la" onclick='
var etiqueta=this.form.etiqueta.value;
var who=config.options.txtUserName;
this.form.who.value=who;
var when=new Date();
this.form.when.value=when;
this.form.text.value=this.form.text.value+"\n"+this.form.script.value;
var tag="Etiquetas"+" "+this.form.linkedfrom.value;
var fields={};

store.saveTiddler(etiqueta,etiqueta,this.form.text.value,who,when,tag,fields);
autoSaveChanges();
'></form>
</html>

and the php file on the server is -

<?php
// inputs: $to, $assunto, $etiqueta, $text, $linkedfrom
// computed: $id, $sys
$errmsg = '';
$sys = $_SERVER['SERVER_NAME']; $sys=str_replace("www.","",$sys);
$id = $_SERVER['REMOTE_ADDR']; if ($_SERVER['REMOTE_HOST']!='')
$id.=' '.$_SERVER['REMOTE_HOST'];
$to = $_REQUEST['to'];
$assunto = $_REQUEST['assunto'];
$etiqueta = $_REQUEST['etiqueta'];
$text = $_REQUEST['text'];
$linkedfromu = $_REQUEST['linkedfrom'];
$who = $_REQUEST['who'];
$when= $_REQUEST['when'];
if ($to=='')
{ $errmsg = "A destination address is required.<br>"; }
else if (!stristr($to,$sys))
{ $errmsg = "Invalid destination: ".$to."<br>Domain must be: ".
$sys."<br>"; }

// connect to references data base
$username="name";
$password="password";
$database="database";

//put data into database
$con = mysql_connect("localhost","name","password");
if (!$con){die ('could not connect:' . mysql_error());}
mysql_select_db("database_Courses",$con);
mysql_query("INSERT INTO table VALUES
('$etiqueta','$text','$linkedfrom','$when')");
mysql_close($con);
?>
<?php
$message=$etiqueta;
mail($to,$assunto,$message,$who);
?>

Hope that helps

Hugs
Skye
Reply all
Reply to author
Forward
0 new messages