Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Problem with attach.r?

 [1/2] from: mechtn::tkweb::net at: 15-Oct-2001 16:46


Ok i've got my email program working almost the way i want it. The problem is when it attachs if makes all the files named o. Can anyone please tell me whats going on with this! Thanks, Koie Smith My test.txt looks like... o40_1995 o40_1996 o40_1997 o40_1998 rebol [ Title: "Emailer that sends attachments" Author: "Koie Smith" Date: 5-Oct-2001 File: %koie.r Purpose: { A simple script, which uses the e-mail capabilities along with attach.r to send attachments. } ] do %user.r do %attach.r do %lower.r if (mesg: ask "Please Enter Message: ") = "" [mesg: "(None)"] lv-header: make system/standard/email [ Subject: "New Order" to: [mechtn--tkweb--net] date: to-idate now Content-Type: {text/plain; charset="iso-8859-1"} ] lv-att: read/lines %test.txt mail mesg lv-header lv-att It looks like this while attaching and sending... Please Enter Message: this is a test message attaching non-string object as: o attaching non-string object as: o attaching non-string object as: o attaching non-string object as: o connecting to: mail.tkweb.net Thanks, Koie Smith

 [2/2] from: philb:upnaway at: 16-Oct-2001 9:10


Hi Koie, Looks like you are passing the lines of test.txt. These lines will just be strings. You should be passing in a block of files ... ie something of type? file Assuming test.txt contains a list of file names then you should try something like .... lv-att: copy [] foreach lv-line read/lines %test.txt [insert lv-att to-file lv-line] mail mesg lv-header lv-att the foreach reads through the lines one at a time, converts the text to a file and inserts it into lv-att. Cheers Phil -- original message -- Ok i've got my email program working almost the way i want it. The problem is when it attachs if makes all the files named o. Can anyone please tell me whats going on with this! Thanks, Koie Smith My test.txt looks like... o40_1995 o40_1996 o40_1997 o40_1998 rebol [ Title: "Emailer that sends attachments" Author: "Koie Smith" Date: 5-Oct-2001 File: %koie.r Purpose: { A simple script, which uses the e-mail capabilities along with attach.r to send attachments. } ] do %user.r do %attach.r do %lower.r if (mesg: ask "Please Enter Message: ") = "" [mesg: "(None)"] lv-header: make system/standard/email [ Subject: "New Order" to: [mechtn--tkweb--net] date: to-idate now Content-Type: {text/plain; charset="iso-8859-1"} ] lv-att: read/lines %test.txt mail mesg lv-header lv-att It looks like this while attaching and sending... Please Enter Message: this is a test message attaching non-string object as: o attaching non-string object as: o attaching non-string object as: o attaching non-string object as: o connecting to: mail.tkweb.net Thanks, Koie Smith