RosettaCodeData/Task/Send-email/Liberty-BASIC/send-email.basic

26 lines
917 B
Plaintext

text$ = "This is a simple text message."
from$ = "user@diga.me.es"
username$ = "me@diga.me.es"
'password$ = "***********"
recipient$ = "somebody@gmail.com"
server$ = "auth.smtp.1and1.co.uk:25"
subject$ = chr$( 34) +text$ +chr$( 34) ' Use quotes to allow spaces in text.
message$ = chr$( 34) +"Hello world." +chr$( 34)
attach$ = "a.txt"
logfile$ = "sendemail.log"
cmd$ = " -f "; from$;_ 'from
" -t "; recipient$;_ 'to
" -u "; subject$;_ 'subject
" -s "; server$;_ 'server
" -m "; message$;_ 'message
" -a "; attach$;_ 'file to attach
" -l "; logfile$;_ 'file to log result in
" -xu "; username$ 'smtp user name
'" -xp "; password$ 'smtp password not given so will ask in a CMD window
run "sendEmail.exe "; cmd$, HIDE
end