sending email attachments from Linux works but not in Windows

matthias_livecode_150811 at m-r-d.de matthias_livecode_150811 at m-r-d.de
Fri Aug 21 02:40:08 EDT 2020


Heriberto,

are you sure that posted code is working on Linux?

Anyway, i would say this part of you script is wrong

-- Attachments (3)

put specialfolderpath("Home") into filepath

put "Questions1.zip" into tAttachments[1]["filepath"]

put "Questions2.zip" into tAttachments[2]["filepath"]

put "Questions3.zip" into tAttachments[3]["filepath"]


tAttachments[]["filepath"] must contain the full file path to the file 
but in your case 

tAttachments[1]["filepath"] 	contains Questions1.zip
tAttachments[2]["filepath"] 	contains Questions2.zip
tAttachments[3]["filepath"] 	contains Questions3.zip

without the full path

Assuming that the files you want to be attached are located on the Desktop...
Change your thar part of you code as follows  and it should work

-- Attachments (3)
put specialfolderpath("Home")" & "/Questions1.zip" into tAttachments[1]["filepath"]

put specialfolderpath("Home") & "/Questions2.zip" into tAttachments[2]["filepath"]

put specialfolderpath("Home") & /"/Questions3.zip" into tAttachments[3]["filepath"]

Now tAttachments[...]["filepath"] array contains the complete paths to the files



The line 
put specialfolderpath("Home") into filepath 
can be deleted.


Regards,

Matthias



-
Matthias Rebbe
Life Is Too Short For Boring Code

> Am 21.08.2020 um 00:02 schrieb Heriberto Torrado via use-livecode <use-livecode at lists.runrev.com>:
> 
> -- Attachments (3)
> 
> put specialfolderpath("Home") into filepath
> 
> put "Questions1.zip" into tAttachments[1]["filepath"]
> 
> put "Questions2.zip" into tAttachments[2]["filepath"]
> 
> put "Questions3.zip" into tAttachments[3]["filepath"]




More information about the use-livecode mailing list