[ic] Email tag crash while sending two attachments

Mike Heins mike at perusion.com
Mon Nov 15 13:41:04 UTC 2010


Quoting Jan van Dijk (j.vandijk at attema.nl):
> Dear all,
>  
> Adding a single attachment using the cgi tag works fine, adding multiple attachments using fixed filenames works fine also, 
> but adding multiple attachments using the cgi tag results in a Runtime error: upload/[cgi ui_upload_filename1]: not readable.
>  
> [email 
>     to=|foo at bar.com|
>     subject=|Email with attachment|
>     attach="upload/[cgi ui_upload_filename]"
> ]This email has an attachment.(works fine)[/email]
>  
> [email
>     to="foo <foo at bar.com>"
>     subject="Email with attachments"
>     attach.0="images/logo_infra.gif"
>     attach.1="images/getacro.gif"
> ]This email has two attachments.(works fine)[/email]
>  
> [email
>     to="foo <foo at bar.com>"
>     subject="Email with attachments"
>     attach.0="upload/[cgi ui_upload_filename1]"
>     attach.1="upload/[cgi ui_upload_filename2]"
> ]This email has two attachments.(crashes)[/email]
>  

As documented, you cannot include IC tags in hash members. This may have
changed in 5.7, but was true before then.

Quick fix is:

    attach=` ["upload/$CGI->{ui_upload_filename1}","upload/$CGI->{ui_upload_filename2}"] `

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.765.328.4479  <mike at perusion.com>

Life is a long lesson in humility. -- James Barrie



More information about the interchange-users mailing list