當前位置: 首頁>>代碼示例>>PHP>>正文


PHP TikiMail::setSMTPParams方法代碼示例

本文整理匯總了PHP中TikiMail::setSMTPParams方法的典型用法代碼示例。如果您正苦於以下問題:PHP TikiMail::setSMTPParams方法的具體用法?PHP TikiMail::setSMTPParams怎麽用?PHP TikiMail::setSMTPParams使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在TikiMail的用法示例。


在下文中一共展示了TikiMail::setSMTPParams方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

			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;
			}
		}
開發者ID:railfuture,項目名稱:tiki-website,代碼行數:31,代碼來源:tiki-webmail.php

示例2: split

     $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);
開發者ID:Kraiany,項目名稱:kraiany_site_docker,代碼行數:31,代碼來源:tiki-webmail.php

示例3: TikiMail

                            }
                            $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;
}
開發者ID:noikiy,項目名稱:owaspbwa,代碼行數:31,代碼來源:tiki-mailin-code.php


注:本文中的TikiMail::setSMTPParams方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。