$parts[1] = $parts[0]; $parts[0] = 'GET'; } $method = $parts[0]; $page = $parts[1]; } else { $page = trim($aux['Subject']); } if ($acc['type'] == 'wiki-get' || $acc['type'] == 'wiki' && $method == "GET") { // A wiki-get account sends a copy of the page to the sender // and also sends the source of the page $mail = new TikiMail(); $mail->setFrom($acc["account"]); $c = $tikilib->get_preference("default_mail_charset", "utf8"); $mail->setHeadCharset($c); $mail->setHtmlCharset($c); $mail->setTextCharset($c); $mail->setSMTPParams($acc["smtp"], $acc["smtpPort"], '', $acc["useAuth"], $acc["username"], $acc["pass"]); if ($tikilib->page_exists($page)) { $mail->setSubject($page); $info = $tikilib->get_page_info($page); $data = $tikilib->parse_data($info["data"]); $mail->addAttachment($info['data'], 'source.txt', 'plain/txt'); $mail->setHTML($data, strip_tags($data)); } else { $l = $tikilib->get_preference("language", "en"); $mail_data = $smarty->fetchLang($l, "mail/mailin_reply_subject.tpl"); $mail->setSubject($mail_data . $page); } $res = $mail->send(array($email_from), 'mail'); $content .= "Response sent<br />";