OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: stephan_35 on November 06, 2009, 06:18:45 AM

Title: how to attach a file with dcl_ActivateEmail ?
Post by: stephan_35 on November 06, 2009, 06:18:45 AM
Hello !

After several try, i ask if it's possible to join a file (attach) with this ?

Here an example :

Code (autolisp) Select

(dcl_ActivateEmail
   "myemail@mydomain.fr"
   (strcat
     (strcat "subject=this is my test "  $something)
     "&body=so go on !
     " (VL-PRIN1-TO-STRING &hereisacode)
     )
   )


other way, working only with thunderbird  ::)

Code (autolisp) Select

(command "_shell"
 (strcat
  "\""
 "\"C:\\Program Files\\Mozilla Thunderbird\\thunderbird.exe\" -compose "
  "\"to='"
 $to
  "',subject='"
  $subject
 "',body='"
  "blablabla."
 "',attachment='file:///" $file "'\""
  "\""
 )



if anyone has any idea ....

Best regards
Title: Re: how to attach a file with dcl_ActivateEmail ?
Post by: owenwengerd on November 06, 2009, 08:05:26 AM
I would guess that the only way is to encode the file in your own code for inclusion into the message body.  This would require something outside of AutoLISP for binary files.  If you're attaching plain text files, it should be pretty straightforward.