Changes

Jump to navigation Jump to search
m
no edit summary
Line 7: Line 7:  
* [[MJT Set 4. How to use JavaScript to develop a Memento Trigger]]
 
* [[MJT Set 4. How to use JavaScript to develop a Memento Trigger]]
 
[[JGC: Bill's JavaScript Guide Companion home]]
 
[[JGC: Bill's JavaScript Guide Companion home]]
 +
 +
=== Captured Nuggets tested by Bill ===
 +
Here are nuggets captured from the forum that could be used in the development of Wiki tutorials, examples, and other such wiki sections.
 +
 +
=== Captured Nuggets not yet tested by Bill ===
 +
Here are nuggets captured from the forum that could be used in the development of Wiki tutorials, examples, and other such wiki sections.
 +
 +
==== Added entry triggers email to the library's owner ====
 +
From forum member's email Mon, Aug 9, 3:13 PM EDT
 +
 +
to UnConnoisseur, MusicBizzer, mementodatabase
 +
 +
Hello,
 +
 +
To send an email you need two things to know:
 +
 +
<pre>
 +
1. Server
 +
(data from Gmail you can find on the web)
 +
SMTP server name - smtp.gmail.com
 +
SMTP user name - yours
 +
SMTP password - yours
 +
SMTP port - 465
 +
(with Gmail I can't send, so I use my own SMTP, from my site)
 +
 +
2. Javascript code
 +
 +
var e = entry();
 +
var h = e.field("host");
 +
var p = e.field("port");
 +
var u = e.field("user");
 +
var ps = e.field("pass");
 +
var f = e.field("from");
 +
 +
var cfg = {"host":h, "port":p, "user":u, "pass":ps, "from":f};
 +
 +
email().send(cfg, "jmruas@jurispro.net" , "Invoice" ,
 +
    "Something"+"<br/>" +
 +
    "Some more"+"<br/>" +
 +
    "etc"+"<br/>" +
 +
    "etc" +"<br/>"+"<br/>" +
 +
    "etc"+<br/>" +
 +
    entry().field('Name') );
 +
</pre>
 +
No need to click" Send". It goes automaticly without opening the email app.
 +
 +
JMRuas

Navigation menu