sending email attachments from Linux works but not in Windows

Heriberto Torrado htorrado at networkdreams.net
Fri Aug 21 12:44:18 EDT 2020


Hi Matthias,

I really appreciate your tip: It works.

Best,
Hery

-----Original Message-----
From: use-livecode <use-livecode-bounces at lists.runrev.com> On Behalf Of
matthias rebbe via use-livecode
Sent: Friday, August 21, 2020 2:40 AM
To: How to use LiveCode <use-livecode at lists.runrev.com>
Cc: matthias_livecode_150811 at m-r-d.de
Subject: Re: sending email attachments from Linux works but not in Windows

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"]

_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list