Add tasks for all the new languages

This commit is contained in:
Tina Müller 2016-12-05 23:44:36 +01:00
parent 9dc3c2bb62
commit bba7bfd280
13208 changed files with 134745 additions and 0 deletions

View file

@ -0,0 +1,33 @@
// with a lot of unneeded params.
// sends plain text and html in same email
// simple usage is below
email_send(
-host = 'mail.example.com',
-port = 25,
-timeout = 100,
-username = 'user.name',
-password = 'secure_password',
-priority = 'immediate',
-to = 'joe@average.com',
-cc = 'jane@average.com',
-bcc = 'me@too.com',
-from = 'lasso@example.com',
-replyto = 'lassorocks@example.com',
-sender = 'lasso@example.com',
-subject = 'Lasso is awesome',
-body = 'Lasso is awesome, you should try it!',
-html = '<p>Lasso is <b>awesome</b>, you should try it!</p>',
-attachments = '/path/to/myFile.txt'
)
// simple usage
// sends plan text email
email_send(
-host = 'mail.example.com',
-username = 'user.name',
-password = 'secure_password',
-to = 'joe@average.com',
-from = 'lasso@example.com',
-subject = 'Lasso is awesome',
-body = 'Lasso is awesome, you should try it!'
)

View file

@ -0,0 +1,53 @@
----------------------------------------
-- Sends email via SMTP using senditquiet.exe (15 KB)
-- @param {string} fromAddr
-- @param {string} toAddr - multiple addresses separated with ;
-- @param {string} subject
-- @param {string} message - use "\n" for line breaks
-- @param {string} [cc=VOID] - optional; multiple addresses separated with ;
-- @param {string} [bcc=VOID] - optional; multiple addresses separated with ;
-- @param {propList} [serverProps=VOID] - optional; allows to overwrite default settings
-- @return {bool} success
----------------------------------------
on sendEmail (fromAddr, toAddr, subject, message, cc, bcc, serverProps)
sx = xtra("Shell").new()
-- senditquiet.exe in folder "bin" relative to current movie
sx.shell_setcurrentdir(_movie.path&"bin")
-- defaults
host = "smtp.gmail.com"
protocol = "ssl"
port = 587
user = "johndoe"
pass = "foobar"
-- if propList 'serverProps' was passed, overwrite defaults
if ilk(serverProps)=#propList then
repeat with i = 1 to serverProps.count
do(serverProps.getPropAt(i)&"="&QUOTE&serverProps[i]&QUOTE)
end repeat
end if
cmd = "senditquiet"
put " -s "&host after cmd
put " -protocol "&protocol after cmd
put " -port "&port after cmd
put " -u "&user after cmd
put " -p "&pass after cmd
put " -f "&QUOTE&fromAddr&QUOTE after cmd
put " -t "&QUOTE&toAddr&QUOTE after cmd
put " -subject "&QUOTE&subject&QUOTE after cmd
put " -body "&QUOTE&message&QUOTE after cmd
-- optional args
if not voidP(cc) then put " -cc "&QUOTE&cc&QUOTE after cmd
if not voidP(bcc) then put " -bcc "&QUOTE&bcc&QUOTE after cmd
put " 1>nul 2>nul & if errorlevel 1 echo ERROR" after cmd
res = sx.shell_cmd(cmd)
return not(res contains "ERROR")
end

View file

@ -0,0 +1 @@
revMail "help@example.com",,"Help!",field "Message"

View file

@ -0,0 +1,17 @@
import smtp, net
proc sendMail(fromAddr: string; toAddrs, ccAddrs: seq[string];
subject, message, login, password: string;
server = "smtp.gmail.com"; port = Port 465; ssl = true) =
var msg = createMessage(subject, message, toAddrs, ccAddrs)
var s = connect(server, port, ssl, debug = true)
s.auth(login, password)
s.sendmail(fromAddr, toAddrs, $msg)
sendMail(fromAddr = "nim@gmail.com",
toAddrs = @["someone@example.com"],
ccAddrs = @[],
subject = "Hi from Nim",
message = "Nim says hi!\nAnd bye again!",
login = "nim@gmail.com",
password = "XXXXXX")

View file

@ -0,0 +1,15 @@
See "Send email..." + nl
sendemail("smtp://smtp.gmail.com",
"calmosoft@gmail.com",
"password",
"calmosoft@gmail.com",
"calmosoft@gmail.com",
"calmosoft@gmail.com",
"Sending email from Ring",
"Hello
How are you?
Are you fine?
Thank you!
Greetings,
CalmoSoft")
see "Done.." + nl