$AddReplyTo = array('field' => '*****@*****.**', 'name' => 'ReplyTo'); $arr = array('AddAddress' => $AddAddress, 'AddCC' => $AddCC, 'AddReplyTo' => $AddReplyTo, 'AddAttachment' => $AddAttachment, 'AddEmbeddedImage' => $AddEmbeddedImage, 'Subject' => 'Subject Thử gửi mail support UTF-8', 'Body' => '<h1>Test mail of PHPMailer html</h1> <p>This is a test picture: <img src="cid:insertImage1" /></p> <p>This is a test picture: <img src="cid:insertImage2" /></p>'); //$c->sendMail($arr, 1); return true; } if (isset($_GET['nhanMail'])) { //include_once('libraries/emailReader.php'); //$email = new emailReader; include_once 'libraries/email5.php'; $host = 'imap.gmail.com'; $port = '993'; $user = '******'; $pass = '******'; $connection = pop3_login($host, $port, $user, $pass, $folder = "INBOX", $ssl = true); $pop3_stat = pop3_stat($connection); $c->_model->_print($pop3_stat); $pop3_list = pop3_list($connection); $row_pop3_list = $pop3_list[5]; $c->_model->_print($row_pop3_list); $mid = $row_pop3_list['msgno']; $pop3_retr = pop3_retr($connection, $mid); //$c->_model->_print($pop3_retr); /*$pop3_dele = pop3_retr($connection, $row_pop3_list['msgno']); $c->_model->_print($pop3_dele);*/ $mail_parse_headers = mail_parse_headers($pop3_retr); $c->_model->_print($mail_parse_headers); $mail_mime_to_array = mail_mime_to_array($connection, $mid, true); $c->_model->_print($mail_mime_to_array); $part = imap_fetchstructure($connection, $mid);
<?php include_once 'pop3_functions.php'; $host = "pop.googlemail.com"; $port = "995"; $user = "******"; $pass = "******"; $mbox = pop3_login($host, $port, $user, $pass, "INBOX", true); if ($mbox) { echo "<h1>Connected</h1>\n"; imap_close($mbox); } else { echo "<h1>FAIL!</h1>\n"; } ?>
include_once LETHE . DIRECTORY_SEPARATOR . 'lib/BHM/PlancakeEmailParser.php'; # Submission Account $ID = !isset($_GET['ID']) || !is_numeric($_GET['ID']) ? 0 : intval($_GET['ID']); $errRes = array(); $maxPost = 1000; $opAcc = $myconn->query("SELECT * FROM " . db_table_pref . "submission_accounts WHERE ID=" . $ID . "") or die(mysqli_error($myconn)); if (mysqli_num_rows($opAcc) != 0) { $opAccRs = $opAcc->fetch_assoc(); $conn_security = array('/novalidate-cert', '/ssl', '/tls'); # Load Bounce Actions $bounceActs = json_decode($opAccRs['bounce_actions'], true); # Connection if ($opAccRs['bounce_acc'] == 0) { $inst = pop3_login($opAccRs['pop3_host'], $opAccRs['pop3_port'], $opAccRs['pop3_user'], $opAccRs['pop3_pass'], $folder = 'INBOX', $conn_security[$opAccRs['pop3_secure']]); } else { $inst = pop3_login($opAccRs['imap_host'], $opAccRs['imap_port'], $opAccRs['imap_user'], $opAccRs['imap_pass'], $folder = 'INBOX', $conn_security[$opAccRs['imap_secure']]); } if (!$inst) { $errRes[] = '* Cannot Connect to Mailbox!'; } else { $cTotal = @imap_num_msg($inst); $list = @pop3_list($inst); $stat = @pop3_stat($inst); $errRes[] = '* Mailbox Connection OK!'; $errRes[] = '* Total Record: ' . $cTotal; $bounceApp = new lethe(); if (!isset($stat['Unread']) || $stat['Unread'] <= 0 || !isset($stat) || !isset($list)) { $stat['Unread'] = 0; $errRes[] = '* Mailbox Empty or There No Unread Mail Found!'; } # Fetch