Launch URL for email questions

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Cool Dave
Posts: 35
Joined: Mon Jun 25, 2012 8:44 pm

Launch URL for email questions

Post by Cool Dave » Thu Oct 25, 2012 11:18 pm

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.)

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Launch URL for email questions

Post by FourthWorld » Fri Oct 26, 2012 12:12 am

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
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Cool Dave
Posts: 35
Joined: Mon Jun 25, 2012 8:44 pm

Re: Launch URL for email questions

Post by Cool Dave » Fri Oct 26, 2012 2:37 am

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

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: Launch URL for email questions

Post by shaosean » Fri Oct 26, 2012 5:33 am

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..

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Launch URL for email questions

Post by FourthWorld » Fri Oct 26, 2012 6:56 am

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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Cool Dave
Posts: 35
Joined: Mon Jun 25, 2012 8:44 pm

Re: Launch URL for email questions

Post by Cool Dave » Fri Oct 26, 2012 5:42 pm

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

Post Reply