I noticed in the pltcl function that string
manipulation and extraction is being used to get the
email address for the "To" and "From" args. I think
this can be better accomplished with regexp. Something
like below I think would do it:
if {[regexp
{[<]?(([-._a-zA-Z0-9]+)@([-._a-zA-Z0-9]+))[>]?} $mailto
-> toemailaddress]} {
return 0
}
This also can be used for the fromemailaddress. I think
this will make the code more readable, compact, and
probably a little faster.
--brett
p.s. I just tried it, and seems to work. You may need
to monkey with the a-zA-Z0-9 to make sure it is
compliant with the email RFC. I also noticed that with
pltcl, there must be an old interpreter used, since I
was unable to use the '\w' (AREs) flag in the regexp. I
think this would have allowed unicode support as
well...oh well.
This would definitely work! I am looking to integrate this soon. Just released a new version.