[ic] Email tag crash while sending two attachments

Gert van der Spoel gert at 3edge.com
Fri Nov 12 21:18:41 UTC 2010


>> Dear All,
>>
>> I am trying to send an email with two attachments using the email tag. 
>> Unfortunately it results in a Internal Server Error.
>>
>>
>> [email
>>    to="Ton Verhagen <tverhagen at alamerce.nl>"
>>    from="Foobar <foobar at example.com>"
>>    subject="Email with an attachment"
>>    attach.0="images/test1.png"
>>    attach.1="images/test2.png"
>>
>> ]This email has two attachments.[/email]
>>
>>
>> Error.log
>> Runtime error: Can't use string ("images/test1.png") as a HASH ref while
>> "strict refs" in use at (tag 'email') line 119.
>>
>> Am I missing something?
>
> Hi Ton,
>
> Below a patch that works for me. This is a patch against the latest
> email.tag available in git, but if you look for the line 'if(! Ref($att) )
> in your version it should also work with that.
>
> I tested 3, 2, 1 and no attachments and all seems to work well ... 
>
> attach.0
> attach.1
>
> actually creates a array ref and not a hash ref from the looks of it.
>
> Perhaps racke can do a 'second opinion' on below patch and improve it ..
> My Perl is getting increasingly rusty these days :)
>

Stefan was fast enough and a patch is in git as we speak .. I do wonder in
what scenario ref($att) would ever be 'HASH' ... 

CU,

Gert




More information about the interchange-users mailing list