0 ) { $page['formemail'] = $email; $page['ct.chatThreadId'] = $thread['threadid']; $page['ct.token'] = $thread['ltoken']; $page['level'] = ""; setup_logo(); expand("styles", getchatstyle(), "mail.tpl"); exit; } $history = ""; $lastid = -1; $output = get_messages( $threadid,"text",true,$lastid ); foreach( $output as $msg ) { $history .= $msg; } $subject = getstring("mail.user.history.subject"); $body = getstring2("mail.user.history.body", array($thread['userName'],$history) ); webim_mail($email, $webim_mailbox, $subject, $body); setup_logo(); expand("styles", getchatstyle(), "mailsent.tpl"); exit; ?>