launch URL to get an e-mail with BCC, Subject and Body (was revMail and BCC)

Andre.Bisseret Andre.Bisseret at inria.fr
Fri Jun 6 04:48:01 EDT 2008


Hi,
I just noticed that 4 answers I posted to Ken Ray, Shao Sean and Klaus  
Major, do not appear in the Archives. So I supposed they have'nt been  
received :-(((
For me here, they have been send normally; (I did not receive any  
daemon message). I am really sorry for that.

So, instead of resending them one by one,  I put together this 4  
answers hereafter (from the more recent to the least one) hoping this  
time that will be received!

Thanks a lot to Josh, Ken, Sean and Klaus who paid attention to my  
problem and helped me to solve it

Best regards from Grenoble
André
-----------------------------------------------------------------------------------------
4/06/08 : SECOND ANSWER TO KLAUS
-----------------------------------------------------------------------------------------

> De : André Bisseret<André.Bisseret at inria.fr>
> Date : 4 juin 2008 15:16:26 HAEC
> À : How to use Revolution <use-revolution at lists.runrev.com>
> Objet : Rép : launch URL to get an e-mail with BCC, Subject and Body  
> (was revMail and BCC)
>
>
> Le 4 juin 08 à 11:30, Klaus Major a écrit :
>
>> Bonjour Andre,
>>
>>>> ...
>>> Thank you Josh for this suggestion. I am using Mail included in  
>>> Leopard on Mac. Seems that it has not this limitation.
>>> I just tried to add my address in "To".
>>> Unfortunately, I get the same result as for the "subject" and  
>>> "body" fields : only texts without any special characters  
>>> (including cr) are allowed (without URLencode ; with URLEncode, I  
>>> get the texts but in their encoded form).
>>
>> This is how Rev (revMail) deals with this problem:
>> ....
>> on revMail pTo, pCC, pSubject, pBody
>> put uniDecode(uniEncode(pSubject), "UTF8") into pSubject
>> put uniDecode(uniEncode(pBody), "UTF8") into pBody
>> put urlEncode(pSubject) into pSubject
>> put urlEncode(pBody) into pBody
>> replace "+" with "%20" in pSubject
>> replace "+" with "%20" in pBody
>> ....
>>
>> Maybe this will inspire you a bit ;-)
>>
>> Note: this fails completely on Windows, see Bug nr. 6432.
>
Viele, viele Dank Klaus,
You are great ;-)) Thanks to you, my handler is working perfectly now.

Hereafter is the solution :
---------------------------------------------------------------
--- I have 2 fields : one including the list of addresses separated by  
"," the other where the body of the message is to be written

local tSubject,tWho,tBody,tCommand,
  ----------------
ON mouseUp
    ask "What is the subject ?"
    IF the result is "cancel" THEN exit mouseUp
    put it into tSubject
    put tSubject
    put fld "TheText" into tBody
    put fld "addresses" into tWho
    put cr & tWho after msg
   -- -- hereafter the lines I added thanks to your suggestion:
    put unidecode(uniencode(tSubject), "UTF8") into tSubject
    put unidecode(uniencode(tBody), "UTF8") into tBody
   -- -- before I had tried the two following lines only
    put urlencode(tSubject) into tSubject
    put urlencode(tBody) into tBody
    replace "+" WITH "%20" in tSubject
    replace "+" WITH "%20" in tBody
    put cr & tBody after msg
    put "launch URL" && quote & "mailto:?BCC=" & tWho & "&" &  
"Subject=" & tSubject & "&" & "Body=" & tBody & quote into tCommand
    do tCommand
END mouseUp
  ------------------------------------------------------------
N.B. : as for revMail, since 2.9.0 it is not necessary any more to use  
uniDecode etc ..

Merci infiniment !

Ich bin jetzt ruhiger (hope it is a right expression ;-))

André
------------------------------------------------------------------------------------------------------------
4.06.08 : FIRST ANSWER TO KLAUS
----------------------------------------------------------------------------------------------------------
Le 4 juin 08 à 11:30, Klaus Major a écrit :

> Bonjour Andre,
>
>>> ...
>>
> replace "+" with "%20" in pSubject
> replace "+" with "%20" in pBody
> ....

Guten tag Klaus,

> Maybe this will inspire you a bit ;-)

I had to abandon "revMail" (unfortunately) because that does not allow  
"BCC".

But, sure, this give me ideas to try to adapt this to "launch URL"
Specially "replace "+" with "%20" could works for me (currently, when  
urlEncoding I got + instead of space).

Thanks a lot ; at least, I have something to try ;-))

best regards from Grenoble
André
--------------------------------------------------------------------------------------------------------------
4/06/08 	ANSWER TO SEAN
--------------------------------------------------------------------------------------------------------------

Le 3 juin 08 à 22:53, Shao Sean a écrit :

> I'll chime in now...
>
> Andre, do you have to use an external email client? If not, you can  
> use one of the Rev-based solutions (myself and Sarah have both  
> written SMTP libraries).. "altEmailHarness" uses my SMTP library it  
> does not make use of the Email Encoding library which converts  
> Unicode text into ASCII based encoding for transmission through SMTP  
> servers..

Hi Sean,
I thank you much for this answer.
I think I am not constrained to use an external email client.
Several days ago, I visited your site, I downloaded "Media browser  
006" but, then,  I did know what to do with it ; I am surely missing  
something easy ; I am not knowledgeable about parts of Rev (libraries  
for example) :-(

Is Media browser 006 the right tool I should use to get this "Email  
Encoding library" ?
Sorry to bother you with my misunderstanding

Best regards from Grenoble
André
------------------------------------------------------------------------------------------------------------
3/06/08 ANSWER TO KEN
-------------------------------------------------------------------------------------------------------------
> - Outlook  and Outlook Express require a space or a semicolon for  
> CCs or
> BCCs if there aren't any (i.e. AFAIK you need to include them in the  
> URL
> string.

Thank you very much Ken for your answer.
>
> Just curious - what email client are you trying to launch?

I am using Mail on Mac (Intel) with Leopard (10.5.3).

>
>
> (FYI, I have been using a modified version of revGoURL  instead of  
> 'launch'
> due to legacy reasons, and so I don't know if there's any "gotchas"  
> with
> using launch for sending emails.)

in my line :
put "launch URL" && quote & "mailto:?BCC=" & tWho & "&" & "Subject=" &  
tSubject & "&" & "Body=" & tBody & quote into tCommande
I can replace launch URL with revGoURL, I get the same result ; the  
two are equivalent.

I have no problem with the addresses
Actually, I get e-mails with the different fields (BCC, subject, body  
filled in as expected, but, provided that the texts for this two  
fields do not include any special characters ; this include the  
carriage returns, so that even without any accented characters, the  
body can include only one line :-((

I don't know any more what I could try!

Anyway, thanks again and best regards from Grenoble
André






More information about the use-livecode mailing list