Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
33
Task/Send-email/Lasso/send-email.lasso
Normal file
33
Task/Send-email/Lasso/send-email.lasso
Normal 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!'
|
||||
)
|
||||
53
Task/Send-email/Lingo/send-email.lingo
Normal file
53
Task/Send-email/Lingo/send-email.lingo
Normal 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)&"=""E&serverProps[i]"E)
|
||||
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 ""E&fromAddr"E after cmd
|
||||
put " -t ""E&toAddr"E after cmd
|
||||
put " -subject ""E&subject"E after cmd
|
||||
put " -body ""E&message"E after cmd
|
||||
|
||||
-- optional args
|
||||
if not voidP(cc) then put " -cc ""E&cc"E after cmd
|
||||
if not voidP(bcc) then put " -bcc ""E&bcc"E 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
|
||||
1
Task/Send-email/LiveCode/send-email.livecode
Normal file
1
Task/Send-email/LiveCode/send-email.livecode
Normal file
|
|
@ -0,0 +1 @@
|
|||
revMail "help@example.com",,"Help!",field "Message"
|
||||
17
Task/Send-email/Nim/send-email.nim
Normal file
17
Task/Send-email/Nim/send-email.nim
Normal 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")
|
||||
15
Task/Send-email/Ring/send-email.ring
Normal file
15
Task/Send-email/Ring/send-email.ring
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue