Page 1 of 1
Launch URL for email questions
Posted: Thu Oct 25, 2012 11:18 pm
by Cool Dave
I realize that there are dozens of posts on emailing from Livecode, and I have read almost all of them. I tried Sarah's SMPT, but it doesn't work anymore, as far as I know. Her POP is just for reading emails, revMail doesn't work all the time, revGoUrl is deprecated... The list goes on.
Finally I have decided (not that my mind is unchangeable) on using launch url ("mailto:
help@mywebsite.com?subject=Application%20Feedback"). But that only provides the subject. So the question is...
How do I determine the content and attachments?
(In case you think you know a better way to do it, I'll give a little more info. My app will be sold to a company, and then they will hand my app out to all their customers. The customers will send emails to the the company. So the system has to be very easy for the customers to figure out.)
Re: Launch URL for email questions
Posted: Fri Oct 26, 2012 12:12 am
by FourthWorld
The mailto proticol uses the same format as calling CGIs, with variable elements in name-value pairs each separate by "&", with all of them separated from the address with ?", e.g.:
Code: Select all
on mouseUp
put "richard@notarealdomain.com" into tRecipient
put "Hello!" into tSubject
put "This is a test" into tMsg
launch url "mailto:"& tRecipient &\
"?&subject="& tSubject &\
"&body="& tMsg
end mouseUp
Re: Launch URL for email questions
Posted: Fri Oct 26, 2012 2:37 am
by Cool Dave
Okay thanks FourthWorld,
I had already figured it out by the time you answered, but thanks anyway. Too bad one can't specify attachments, but that's just not possible using this protocol.
Dave
Re: Launch URL for email questions
Posted: Fri Oct 26, 2012 5:33 am
by shaosean
SMTP does not support attachments

MIME allows one to create an email message that has specific parts that mean something to the user's mail agent (if it supports MIME)..
Do a search for my old SMTP library as I think someone was hosting it on their server, it should still work.. Not too certain if I ever released my MIME encoding library or not, but you can search for that too and see if it is available for download..
Re: Launch URL for email questions
Posted: Fri Oct 26, 2012 6:56 am
by FourthWorld
Cool Dave wrote: Too bad one can't specify attachments, but that's just not possible using this protocol.
Since your company will be the recipient of the message, you may consider setting up a CGI for this and using HTTP/POST instead of email. Much simpler for both you and the customer.
Re: Launch URL for email questions
Posted: Fri Oct 26, 2012 5:42 pm
by Cool Dave
My company isn't receiving the emails, a company we sell the app to would. So I don't want anything to complicated for them. I may have to go more professional later, but for now I just want maximum functionality (zero bugs). For now, I think launch url will work fine.
Thanks everyone,
Dave