Emailing from within Revolution
Mark Smith
mark at maseurope.net
Sat Oct 13 19:02:56 EDT 2007
Paul, this is a basic script I use with Shao Sean's library, and
which seems to work well. Note that I there is no checking/validating
of the inputs, and I haven't provided for a subject line or tried to
do attachments or anything...
function sendAnEmail pSmtpServer, pFrom, pTo, pMsg
put 0 into tries
repeat until isOpen or tries > 5
put smtpOpen(pSmtpServer,"","","","") into isOpen
add 1 to tries
end repeat
if isOpen then
put smtpSend(pFrom, pTo, pMsg) into tSent
put smtpClose() into tClosed
return isOpen & comma & tries & comma & tSent & comma & tClosed
else
return "couldn't send email: " & tries && "tries"
end if
end sendAnEmail
pSmtpServer is the outgoing server to use eg mailhost at yourIsp.com
pFrom is your email address, pTo is the recipients email address, and
pMsg is, well, the message.
Best,
Mark
On 13 Oct 2007, at 21:32, Paul Gabel wrote:
> As an intermediate Revolution user, I'd like my standalone to be
> able to send an email by script completely within Revolution, not,
> as revMail does, require the user to explicitly send it from the
> email application (in my case — Apple's Mail program). I've looked
> at Shao Sean's libSMTP and Altuit's altEmailHarness, but these look
> rather complicated for me and were written at the end of 2005. Is
> there anything easier, more "built-in," and more recent? Thank you.
>
> Paul Gabel_______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list