+
+ // the next four lines use strrev to reverse any nested boundaries
+ // as a workaround for Courier-IMAP, which will stop parsing
+ // when it sees the original outer boundary string and ignore
+ // our "_part_..." addition to that string. a bug report has been
+ // made, but in the meantime...
+ //
+ } else if (strpos($boundary,'_trap_')) {
+ $boundary = substr(strrev($boundary),0,strpos(strrev($boundary),'_part_'));