Hi,
Finally I customized some different stacks to fill them with the different info (depending on the case) i would like to put in the PDF i want to send by mail...
And this is working ok...
Now my problem is sending the mail...
I read in the lessons and in the forum and it seems difficult to do what i want ( create one pdf and send it directly by mail) ...

I would like to send one mail, and attach the PDF document i just created before.
I followed the steps in these two lessons:
"How do I Create an HTML E-Mail?" and "How do I Attach a File to an E-Mail?"
I can send one e-mail as it is explaied in the first lesson.
But i can't attach the file...In fact i see that the file is attached but the size is 0 bytes...
I tried this with several files ( PDF, TXT, PNG, etc...) but always the size is 0 bytes...
This is the script of the button Launch:
local lvLaunchString
global gvAttachment
command populateLaunchString @pLaunchString avToken avArgument
if avArgument is empty then exit populateLaunchString
if pLaunchString is not empty then put pLaunchString & "," into pLaunchString
put pLaunchString & avToken & "'" & avArgument & "'" into pLaunchString
end populateLaunchString
on mouseUp
put empty into lvLaunchString
populateLaunchString lvLaunchString, "to=", the text of field "toField"
populateLaunchString lvLaunchString, "cc=", the text of field "ccField"
populateLaunchString lvLaunchString, "subject=", the text of field "subjectField"
populateLaunchString lvLaunchString, "body=", the text of field "bodyField"
populateLaunchString lvLaunchString, "attachment=", gvAttachment
if the platform is "MacOS" then # we are on a Mac
put "/Applications/Thunderbird.app/Contents/MacOS/thunderbird-bin -compose" && lvLaunchString into lvLaunchString
else if the platform is "Win32" then # we are on Windows
put "C:\Program Files\Mozilla Thunderbird\thunderbird.exe -compose" && lvLaunchString into lvLaunchString
else # we do not support this platform
exit to top
end if
set the hideConsoleWindows to true
open process lvLaunchString for update
close process lvLaunchString
put empty into gvAttachment
end mouseUp
And this for the button Attach:
global gvAttachment
on mouseUp
# open the file selection dialog
answer file "Select a File to Attach"
if it is empty then exit mouseUp
# add the selected attachment to other possible attachments
if gvAttachment is not empty then put gvAttachment & "," into gvAttachment
put gvAttachment & it into gvAttachment
end mouseUp
What am i doing worng for the attachment? Sending mails without attachment is working...
I am working in Windows platform, but i also would like it will work to OS, IOS, and Android...
It is a pity that we can't send the mail directly from LiveCode and need to do it from ThunderBird...

Or maybe it is possible but it is me who understood bad?
The application would be more 'clean' and 'clear' if we could do this without pass from another one ( in this case Thunderbird)...
regards,
fko