[ic] Email tag crash while sending two attachments
Ton Verhagen
ton at verhagen.net
Sat Nov 13 09:32:49 UTC 2010
On Nov 12, 2010, at 22:18 PM, Gert van der Spoel wrote:
>>> 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' ...
Thank you Gert & Racke for this quick fix. Much appreciated!
Best regards,
Ton
More information about the interchange-users
mailing list