Esempio n. 1
0
			check_ticket('webmail');
			$a2 = $mail->getFile('temp/mail_attachs/' . $_REQUEST['attach2file']);

			$mail->addAttachment($a2, $_REQUEST['attach2'], $_REQUEST['attach2type']);
			@unlink('temp/mail_attachs/' . $_REQUEST['attach2file']);
		}

		if ($_REQUEST['attach3']) {
			check_ticket('webmail');
			$a3 = $mail->getFile('temp/mail_attachs/' . $_REQUEST['attach3file']);

			$mail->addAttachment($a3, $_REQUEST['attach3'], $_REQUEST['attach3type']);
			@unlink('temp/mail_attachs/' . $_REQUEST['attach3file']);
		}

		$mail->setSMTPParams($current['smtp'], $current['smtpPort'], '', $current['useAuth'], $current['username'], $current['pass']);

		if (isset($_REQUEST['useHTML']) && $_REQUEST['useHTML'] == 'on') {
			$mail->setHTML($_REQUEST['body'], strip_tags($_REQUEST['body']));
		} else {
			$mail->setText($_REQUEST['body']);
		}

		$to_array_1 = preg_split('/[, ;]/', $_REQUEST['to']);
		$to_array = array();

		foreach ($to_array_1 as $to_1) {
			if (!empty($to_1)) {
				$to_array[] = $to_1;
			}
		}
     $mail->addAttachment($a1, $_REQUEST["attach1"], $_REQUEST["attach1type"]);
     @unlink('temp/mail_attachs/' . $_REQUEST["attach1file"]);
 }
 if ($_REQUEST["attach2"]) {
     check_ticket('webmail');
     $a2 = $mail->getFile('temp/mail_attachs/' . $_REQUEST["attach2file"]);
     $mail->addAttachment($a2, $_REQUEST["attach2"], $_REQUEST["attach2type"]);
     @unlink('temp/mail_attachs/' . $_REQUEST["attach2file"]);
 }
 if ($_REQUEST["attach3"]) {
     check_ticket('webmail');
     $a3 = $mail->getFile('temp/mail_attachs/' . $_REQUEST["attach3file"]);
     $mail->addAttachment($a3, $_REQUEST["attach3"], $_REQUEST["attach3type"]);
     @unlink('temp/mail_attachs/' . $_REQUEST["attach3file"]);
 }
 $mail->setSMTPParams($current["smtp"], $current["smtpPort"], '', $current["useAuth"], $current["username"], $current["pass"]);
 if (isset($_REQUEST["useHTML"]) && $_REQUEST["useHTML"] == 'on') {
     $mail->setHTML($_REQUEST["body"], strip_tags($_REQUEST["body"]));
 } else {
     $mail->setText($_REQUEST["body"]);
 }
 $to_array_1 = split('[, ;]', $_REQUEST["to"]);
 $to_array = array();
 foreach ($to_array_1 as $to_1) {
     if (!empty($to_1)) {
         $to_array[] = $to_1;
     }
 }
 $to_array = $contactlib->parse_nicknames($to_array);
 // Get email addresses not in the address book
 $not_contacts = $contactlib->are_contacts($to_array, $user);
Esempio n. 3
0
                            }
                            $tikilib->update_page($page, $body, "Updated from " . $acc["account"], $aux["sender"]["user"], '0.0.0.0', '');
                            $content .= "Page: {$page} has been updated";
                        }
                    }
                    mailin_check_attachments($output, $content, $page, $aux["sender"]["user"]);
                } else {
                    $mail = new TikiMail();
                    $mail->setFrom($acc["account"]);
                    $c = $tikilib->get_preference("default_mail_charset", "utf8");
                    $mail->setHeadCharset($c);
                    $mail->setTextCharset($c);
                    $l = $tikilib->get_preference("language", "en");
                    $mail_data = $smarty->fetchLang($l, "mail/mailin_help_subject.tpl");
                    $mail->setSubject($mail_data);
                    $mail->setSMTPParams($acc["smtp"], $acc["smtpPort"], '', $acc["useAuth"], $acc["username"], $acc["pass"]);
                    $smarty->assign('subject', $output['header']['subject']);
                    $mail_data = $smarty->fetchLang($l, "mail/mailin_help.tpl");
                    $mail->setText($mail_data);
                    $res = $mail->send(array($email_from), 'mail');
                }
            }
        }
        //end if($cantUseMailIn)
        // Remove the email from the pop3 server
        $pop3->deleteMsg($i);
    }
    //end for ($i = 1; $i <= $mailsum; $i++)
    $pop3->disconnect();
    //echo $content;
}