Sending email in livecode
Posted: Sun Nov 03, 2013 7:26 am
i am trying to Build a program that will send a default email to an email address , The receiver address will be taken from a text field , and the sender address , subject , message will be provided on the code .
I tried this code and i got a problem when it get to "get shell("echo" && wrapQ(shellEscape(tMsg)) && "| /usr/sbin/sendmail" && "
The button send :
I tried this code and i got a problem when it get to "get shell("echo" && wrapQ(shellEscape(tMsg)) && "| /usr/sbin/sendmail" && "
The button send :
Code: Select all
on mouseUp
local tMsg
put "Been checked" into tMsg
put "User2@???????" into pFrom
put the text of field "emailtext" into pTo
put "Checked" into pSub
put "Been checked" into tMsg
put "Checked" into pSub
put "From:" && pFrom & return & "To:" && pTo & return & "Subject:" && pSub & \
return into tMsg
get shell("echo" && wrapQ(shellEscape(tMsg)) && "| /usr/sbin/sendmail" && \
wrapQ(shellEscape(pTo)) && "-f" && wrapQ(shellEscape(pFrom)))
send mail
end mouseUp