├── .gitignore ├── .DS_Store ├── img ├── favicon.ico └── background.png ├── footer.php ├── about.php ├── index.php ├── server └── send.php ├── email ├── src │ ├── Exception.php │ ├── OAuth.php │ ├── POP3.php │ └── SMTP.php ├── language │ ├── phpmailer.lang-zh_cn.php │ ├── phpmailer.lang-ch.php │ ├── phpmailer.lang-zh.php │ ├── phpmailer.lang-ko.php │ ├── phpmailer.lang-he.php │ ├── phpmailer.lang-ja.php │ ├── phpmailer.lang-nb.php │ ├── phpmailer.lang-af.php │ ├── phpmailer.lang-cs.php │ ├── phpmailer.lang-lv.php │ ├── phpmailer.lang-sv.php │ ├── phpmailer.lang-da.php │ ├── phpmailer.lang-vi.php │ ├── phpmailer.lang-lt.php │ ├── phpmailer.lang-nl.php │ ├── phpmailer.lang-fo.php │ ├── phpmailer.lang-eo.php │ ├── phpmailer.lang-az.php │ ├── phpmailer.lang-hu.php │ ├── phpmailer.lang-hi.php │ ├── phpmailer.lang-ar.php │ ├── phpmailer.lang-fa.php │ ├── phpmailer.lang-am.php │ ├── phpmailer.lang-be.php │ ├── phpmailer.lang-bg.php │ ├── phpmailer.lang-ca.php │ ├── phpmailer.lang-tl.php │ ├── phpmailer.lang-es.php │ ├── phpmailer.lang-ba.php │ ├── phpmailer.lang-fi.php │ ├── phpmailer.lang-sk.php │ ├── phpmailer.lang-et.php │ ├── phpmailer.lang-gl.php │ ├── phpmailer.lang-ro.php │ ├── phpmailer.lang-tr.php │ ├── phpmailer.lang-hr.php │ ├── phpmailer.lang-ms.php │ ├── phpmailer.lang-de.php │ ├── phpmailer.lang-ru.php │ ├── phpmailer.lang-pl.php │ ├── phpmailer.lang-el.php │ ├── phpmailer.lang-sl.php │ ├── phpmailer.lang-uk.php │ ├── phpmailer.lang-ka.php │ ├── phpmailer.lang-sr.php │ ├── phpmailer.lang-mg.php │ ├── phpmailer.lang-id.php │ ├── phpmailer.lang-it.php │ ├── phpmailer.lang-pt.php │ ├── phpmailer.lang-pt_br.php │ └── phpmailer.lang-fr.php ├── composer.json ├── emailsend.php └── get_oauth_token.php ├── time.sql ├── status.php ├── README.md ├── check.php ├── submit.php ├── write.php ├── header.php ├── config.php ├── welcome.php └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | .idea -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soxft/TimeMail/HEAD/.DS_Store -------------------------------------------------------------------------------- /img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soxft/TimeMail/HEAD/img/favicon.ico -------------------------------------------------------------------------------- /img/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soxft/TimeMail/HEAD/img/background.png -------------------------------------------------------------------------------- /footer.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /about.php: -------------------------------------------------------------------------------- 1 | 4 |
5 |
6 |

关于

7 |  1.该网站由个人运营,不能保证您在未来一定收到信件,但我一定会尽力让您收到您发送的信件,因为那是您最宝贵的财富.
8 |  2.本站运行在香港腾讯云上,使用cloudflare CDN进行加速,前端采用MDUI框架后端使用PHP发信采用腾讯企业邮箱.对于定时发信采用screen+php的方式,未来将会增加其稳定性.
9 |  3.寄出的信是不可撤回的,也不可查找,希望你也忘掉这件事,直到你收到信的那一天.
10 |  4.同时在投递的那一刻我们将向你的邮箱发送一封确认邮件,只有点击确认邮件中的链接,您才能在未来收到邮件.
11 |  5.请记得将service#xcsoft.top加入邮箱白名单,以防收不到信.
12 |  6.发送邮件请遵守当地法律法规!
13 |
14 |
15 |
16 |
17 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 10 |
11 |
12 |

欢迎来到TimeMail - 时光邮局

13 |
14 |
给未来写封信
15 |
多年之后 愿你不负所期
16 |
17 |
18 |
 立即写信 19 |
20 |
21 |
22 |

未来的你,过的还好吗? 23 |
给未来写封信,从过去获得惊喜, 24 |
给未来的自己带来些鼓励的话, 25 |
或是写下一些目标,看未来的自己是否实现

26 | 27 |
28 |
29 |
30 | -------------------------------------------------------------------------------- /server/send.php: -------------------------------------------------------------------------------- 1 | TimeMail - 时光邮局
您收到一封来自" . date("Y",$re['from']) . "年" . date("m",$re['from']) . "月" . date("d",$re['from']) . "日的信件:

" . $re['content'] . "

感谢使用时光邮局Powered ByXCSOFT"); 12 | if ($return = 200) { 13 | $uid = $re['uid']; 14 | $topic = $re['topic']; 15 | $content = $re['content']; 16 | $email = $re['email']; 17 | $timenow = $re['from']; 18 | $time = $re['to']; 19 | $ip = $re['ip']; 20 | mysqli_query($conn,"DELETE FROM `waiting` WHERE `uid`='$uid';"); 21 | //删除元数据 22 | mysqli_query($conn,"INSERT INTO `sent` VALUES('$uid','$topic','$content','$email','$timenow','$time','$ip')"); 23 | //迁移数据 24 | $succ++; 25 | } else { 26 | $error++; 27 | } 28 | } else { 29 | break; 30 | } 31 | } 32 | if ($error + $succ !== 0) { 33 | echo "处理完毕 -> ".$succ."封邮件发送成功! | ".$error."封邮件发送失败\r\n"; 34 | }else{ 35 | echo "无今日邮件!\r\n"; 36 | } 37 | ?> -------------------------------------------------------------------------------- /email/src/Exception.php: -------------------------------------------------------------------------------- 1 | 9 | * @author Jim Jagielski (jimjag) 10 | * @author Andy Prevost (codeworxtech) 11 | * @author Brent R. Matzelle (original founder) 12 | * @copyright 2012 - 2017 Marcus Bointon 13 | * @copyright 2010 - 2012 Jim Jagielski 14 | * @copyright 2004 - 2009 Andy Prevost 15 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 16 | * @note This program is distributed in the hope that it will be useful - WITHOUT 17 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 18 | * FITNESS FOR A PARTICULAR PURPOSE. 19 | */ 20 | 21 | namespace PHPMailer\PHPMailer; 22 | 23 | /** 24 | * PHPMailer exception handler. 25 | * 26 | * @author Marcus Bointon 27 | */ 28 | class Exception extends \Exception 29 | { 30 | /** 31 | * Prettify error message output. 32 | * 33 | * @return string 34 | */ 35 | public function errorMessage() 36 | { 37 | return '' . htmlspecialchars($this->getMessage()) . "
\n"; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-zh_cn.php: -------------------------------------------------------------------------------- 1 | 6 | * @author young 7 | * @author Teddysun 8 | */ 9 | 10 | $PHPMAILER_LANG['authenticate'] = 'SMTP 错误:登录失败。'; 11 | $PHPMAILER_LANG['connect_host'] = 'SMTP 错误:无法连接到 SMTP 主机。'; 12 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误:数据不被接受。'; 13 | $PHPMAILER_LANG['empty_message'] = '邮件正文为空。'; 14 | $PHPMAILER_LANG['encoding'] = '未知编码:'; 15 | $PHPMAILER_LANG['execute'] = '无法执行:'; 16 | $PHPMAILER_LANG['file_access'] = '无法访问文件:'; 17 | $PHPMAILER_LANG['file_open'] = '文件错误:无法打开文件:'; 18 | $PHPMAILER_LANG['from_failed'] = '发送地址错误:'; 19 | $PHPMAILER_LANG['instantiate'] = '未知函数调用。'; 20 | $PHPMAILER_LANG['invalid_address'] = '发送失败,电子邮箱地址是无效的:'; 21 | $PHPMAILER_LANG['mailer_not_supported'] = '发信客户端不被支持。'; 22 | $PHPMAILER_LANG['provide_address'] = '必须提供至少一个收件人地址。'; 23 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误:收件人地址错误:'; 24 | $PHPMAILER_LANG['signing'] = '登录失败:'; 25 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP服务器连接失败。'; 26 | $PHPMAILER_LANG['smtp_error'] = 'SMTP服务器出错:'; 27 | $PHPMAILER_LANG['variable_set'] = '无法设置或重置变量:'; 28 | $PHPMAILER_LANG['extension_missing'] = '丢失模块 Extension:'; 29 | -------------------------------------------------------------------------------- /time.sql: -------------------------------------------------------------------------------- 1 | -- Adminer 4.6.3 MySQL dump 2 | 3 | SET NAMES utf8; 4 | SET time_zone = '+00:00'; 5 | SET foreign_key_checks = 0; 6 | SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; 7 | 8 | DROP TABLE IF EXISTS `check`; 9 | CREATE TABLE `check` ( 10 | `uid` mediumtext NOT NULL, 11 | `code` mediumtext NOT NULL, 12 | `time` mediumtext NOT NULL 13 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 14 | 15 | 16 | DROP TABLE IF EXISTS `checking`; 17 | CREATE TABLE `checking` ( 18 | `uid` mediumtext NOT NULL, 19 | `topic` mediumtext NOT NULL, 20 | `content` mediumtext NOT NULL, 21 | `email` mediumtext NOT NULL, 22 | `from` mediumtext NOT NULL, 23 | `to` mediumtext NOT NULL, 24 | `ip` mediumtext NOT NULL 25 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 26 | 27 | 28 | DROP TABLE IF EXISTS `sent`; 29 | CREATE TABLE `sent` ( 30 | `uid` mediumtext NOT NULL, 31 | `topic` mediumtext NOT NULL, 32 | `content` mediumtext NOT NULL, 33 | `email` mediumtext NOT NULL, 34 | `from` mediumtext NOT NULL, 35 | `to` mediumtext NOT NULL, 36 | `ip` mediumtext NOT NULL 37 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 38 | 39 | 40 | DROP TABLE IF EXISTS `waiting`; 41 | CREATE TABLE `waiting` ( 42 | `uid` mediumtext NOT NULL, 43 | `topic` mediumtext NOT NULL, 44 | `content` mediumtext NOT NULL, 45 | `email` mediumtext NOT NULL, 46 | `from` mediumtext NOT NULL, 47 | `to` mediumtext NOT NULL, 48 | `ip` mediumtext NOT NULL 49 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 50 | 51 | 52 | -- 2020-08-30 05:14:41 53 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-ch.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'SMTP 错误:身份验证失败。'; 9 | $PHPMAILER_LANG['connect_host'] = 'SMTP 错误: 不能连接SMTP主机。'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误: 数据不可接受。'; 11 | //$PHPMAILER_LANG['empty_message'] = 'Message body empty'; 12 | $PHPMAILER_LANG['encoding'] = '未知编码:'; 13 | $PHPMAILER_LANG['execute'] = '不能执行: '; 14 | $PHPMAILER_LANG['file_access'] = '不能访问文件:'; 15 | $PHPMAILER_LANG['file_open'] = '文件错误:不能打开文件:'; 16 | $PHPMAILER_LANG['from_failed'] = '下面的发送地址邮件发送失败了: '; 17 | $PHPMAILER_LANG['instantiate'] = '不能实现mail方法。'; 18 | //$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' 您所选择的发送邮件的方法并不支持。'; 20 | $PHPMAILER_LANG['provide_address'] = '您必须提供至少一个 收信人的email地址。'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误: 下面的 收件人失败了: '; 22 | //$PHPMAILER_LANG['signing'] = 'Signing Error: '; 23 | //$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; 24 | //$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; 25 | //$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; 26 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 27 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-zh.php: -------------------------------------------------------------------------------- 1 | 6 | * @author Peter Dave Hello <@PeterDaveHello/> 7 | * @author Jason Chiang 8 | */ 9 | 10 | $PHPMAILER_LANG['authenticate'] = 'SMTP 錯誤:登入失敗。'; 11 | $PHPMAILER_LANG['connect_host'] = 'SMTP 錯誤:無法連線到 SMTP 主機。'; 12 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 錯誤:無法接受的資料。'; 13 | $PHPMAILER_LANG['empty_message'] = '郵件內容為空'; 14 | $PHPMAILER_LANG['encoding'] = '未知編碼: '; 15 | $PHPMAILER_LANG['execute'] = '無法執行:'; 16 | $PHPMAILER_LANG['file_access'] = '無法存取檔案:'; 17 | $PHPMAILER_LANG['file_open'] = '檔案錯誤:無法開啟檔案:'; 18 | $PHPMAILER_LANG['from_failed'] = '發送地址錯誤:'; 19 | $PHPMAILER_LANG['instantiate'] = '未知函數呼叫。'; 20 | $PHPMAILER_LANG['invalid_address'] = '因為電子郵件地址無效,無法傳送: '; 21 | $PHPMAILER_LANG['mailer_not_supported'] = '不支援的發信客戶端。'; 22 | $PHPMAILER_LANG['provide_address'] = '必須提供至少一個收件人地址。'; 23 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 錯誤:以下收件人地址錯誤:'; 24 | $PHPMAILER_LANG['signing'] = '電子簽章錯誤: '; 25 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP 連線失敗'; 26 | $PHPMAILER_LANG['smtp_error'] = 'SMTP 伺服器錯誤: '; 27 | $PHPMAILER_LANG['variable_set'] = '無法設定或重設變數: '; 28 | $PHPMAILER_LANG['extension_missing'] = '遺失模組 Extension: '; 29 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-ko.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'SMTP 오류: 인증할 수 없습니다.'; 9 | $PHPMAILER_LANG['connect_host'] = 'SMTP 오류: SMTP 호스트에 접속할 수 없습니다.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 오류: 데이터가 받아들여지지 않았습니다.'; 11 | $PHPMAILER_LANG['empty_message'] = '메세지 내용이 없습니다'; 12 | $PHPMAILER_LANG['encoding'] = '알 수 없는 인코딩: '; 13 | $PHPMAILER_LANG['execute'] = '실행 불가: '; 14 | $PHPMAILER_LANG['file_access'] = '파일 접근 불가: '; 15 | $PHPMAILER_LANG['file_open'] = '파일 오류: 파일을 열 수 없습니다: '; 16 | $PHPMAILER_LANG['from_failed'] = '다음 From 주소에서 오류가 발생했습니다: '; 17 | $PHPMAILER_LANG['instantiate'] = 'mail 함수를 인스턴스화할 수 없습니다'; 18 | $PHPMAILER_LANG['invalid_address'] = '잘못된 주소: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' 메일러는 지원되지 않습니다.'; 20 | $PHPMAILER_LANG['provide_address'] = '적어도 한 개 이상의 수신자 메일 주소를 제공해야 합니다.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 오류: 다음 수신자에서 오류가 발생했습니다: '; 22 | $PHPMAILER_LANG['signing'] = '서명 오류: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP 연결을 실패하였습니다.'; 24 | $PHPMAILER_LANG['smtp_error'] = 'SMTP 서버 오류: '; 25 | $PHPMAILER_LANG['variable_set'] = '변수 설정 및 초기화 불가: '; 26 | $PHPMAILER_LANG['extension_missing'] = '확장자 없음: '; 27 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-he.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'שגיאת SMTP: פעולת האימות נכשלה.'; 9 | $PHPMAILER_LANG['connect_host'] = 'שגיאת SMTP: לא הצלחתי להתחבר לשרת SMTP.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'שגיאת SMTP: מידע לא התקבל.'; 11 | $PHPMAILER_LANG['empty_message'] = 'גוף ההודעה ריק'; 12 | $PHPMAILER_LANG['invalid_address'] = 'כתובת שגויה: '; 13 | $PHPMAILER_LANG['encoding'] = 'קידוד לא מוכר: '; 14 | $PHPMAILER_LANG['execute'] = 'לא הצלחתי להפעיל את: '; 15 | $PHPMAILER_LANG['file_access'] = 'לא ניתן לגשת לקובץ: '; 16 | $PHPMAILER_LANG['file_open'] = 'שגיאת קובץ: לא ניתן לגשת לקובץ: '; 17 | $PHPMAILER_LANG['from_failed'] = 'כתובות הנמענים הבאות נכשלו: '; 18 | $PHPMAILER_LANG['instantiate'] = 'לא הצלחתי להפעיל את פונקציית המייל.'; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' אינה נתמכת.'; 20 | $PHPMAILER_LANG['provide_address'] = 'חובה לספק לפחות כתובת אחת של מקבל המייל.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'שגיאת SMTP: הנמענים הבאים נכשלו: '; 22 | $PHPMAILER_LANG['signing'] = 'שגיאת חתימה: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; 24 | $PHPMAILER_LANG['smtp_error'] = 'שגיאת שרת SMTP: '; 25 | $PHPMAILER_LANG['variable_set'] = 'לא ניתן לקבוע או לשנות את המשתנה: '; 26 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 27 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-ja.php: -------------------------------------------------------------------------------- 1 | 6 | * @author Yoshi Sakai 7 | */ 8 | 9 | $PHPMAILER_LANG['authenticate'] = 'SMTPエラー: 認証できませんでした。'; 10 | $PHPMAILER_LANG['connect_host'] = 'SMTPエラー: SMTPホストに接続できませんでした。'; 11 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTPエラー: データが受け付けられませんでした。'; 12 | //$PHPMAILER_LANG['empty_message'] = 'Message body empty'; 13 | $PHPMAILER_LANG['encoding'] = '不明なエンコーディング: '; 14 | $PHPMAILER_LANG['execute'] = '実行できませんでした: '; 15 | $PHPMAILER_LANG['file_access'] = 'ファイルにアクセスできません: '; 16 | $PHPMAILER_LANG['file_open'] = 'ファイルエラー: ファイルを開けません: '; 17 | $PHPMAILER_LANG['from_failed'] = 'Fromアドレスを登録する際にエラーが発生しました: '; 18 | $PHPMAILER_LANG['instantiate'] = 'メール関数が正常に動作しませんでした。'; 19 | //$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; 20 | $PHPMAILER_LANG['provide_address'] = '少なくとも1つメールアドレスを 指定する必要があります。'; 21 | $PHPMAILER_LANG['mailer_not_supported'] = ' メーラーがサポートされていません。'; 22 | $PHPMAILER_LANG['recipients_failed'] = 'SMTPエラー: 次の受信者アドレスに 間違いがあります: '; 23 | //$PHPMAILER_LANG['signing'] = 'Signing Error: '; 24 | //$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; 25 | //$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; 26 | //$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; 27 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 28 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-nb.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'SMTP kļūda: Autorizācija neizdevās.'; 9 | $PHPMAILER_LANG['connect_host'] = 'SMTP Kļūda: Nevar izveidot savienojumu ar SMTP serveri.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP Kļūda: Nepieņem informāciju.'; 11 | $PHPMAILER_LANG['empty_message'] = 'Ziņojuma teksts ir tukšs'; 12 | $PHPMAILER_LANG['encoding'] = 'Neatpazīts kodējums: '; 13 | $PHPMAILER_LANG['execute'] = 'Neizdevās izpildīt komandu: '; 14 | $PHPMAILER_LANG['file_access'] = 'Fails nav pieejams: '; 15 | $PHPMAILER_LANG['file_open'] = 'Faila kļūda: Nevar atvērt failu: '; 16 | $PHPMAILER_LANG['from_failed'] = 'Nepareiza sūtītāja adrese: '; 17 | $PHPMAILER_LANG['instantiate'] = 'Nevar palaist sūtīšanas funkciju.'; 18 | $PHPMAILER_LANG['invalid_address'] = 'Nepareiza adrese: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' sūtītājs netiek atbalstīts.'; 20 | $PHPMAILER_LANG['provide_address'] = 'Lūdzu, norādiet vismaz vienu adresātu.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP kļūda: neizdevās nosūtīt šādiem saņēmējiem: '; 22 | $PHPMAILER_LANG['signing'] = 'Autorizācijas kļūda: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP savienojuma kļūda'; 24 | $PHPMAILER_LANG['smtp_error'] = 'SMTP servera kļūda: '; 25 | $PHPMAILER_LANG['variable_set'] = 'Nevar piešķirt mainīgā vērtību: '; 26 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 27 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-sv.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'SMTP fel: Kunde inte autentisera.'; 9 | $PHPMAILER_LANG['connect_host'] = 'SMTP fel: Kunde inte ansluta till SMTP-server.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP fel: Data accepterades inte.'; 11 | //$PHPMAILER_LANG['empty_message'] = 'Message body empty'; 12 | $PHPMAILER_LANG['encoding'] = 'Okänt encode-format: '; 13 | $PHPMAILER_LANG['execute'] = 'Kunde inte köra: '; 14 | $PHPMAILER_LANG['file_access'] = 'Ingen åtkomst till fil: '; 15 | $PHPMAILER_LANG['file_open'] = 'Fil fel: Kunde inte öppna fil: '; 16 | $PHPMAILER_LANG['from_failed'] = 'Följande avsändaradress är felaktig: '; 17 | $PHPMAILER_LANG['instantiate'] = 'Kunde inte initiera e-postfunktion.'; 18 | $PHPMAILER_LANG['invalid_address'] = 'Felaktig adress: '; 19 | $PHPMAILER_LANG['provide_address'] = 'Du måste ange minst en mottagares e-postadress.'; 20 | $PHPMAILER_LANG['mailer_not_supported'] = ' mailer stöds inte.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP fel: Följande mottagare är felaktig: '; 22 | $PHPMAILER_LANG['signing'] = 'Signerings fel: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() misslyckades.'; 24 | $PHPMAILER_LANG['smtp_error'] = 'SMTP server fel: '; 25 | $PHPMAILER_LANG['variable_set'] = 'Kunde inte definiera eller återställa variabel: '; 26 | $PHPMAILER_LANG['extension_missing'] = 'Tillägg ej tillgängligt: '; 27 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-da.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'SMTP fejl: Kunne ikke logge på.'; 9 | $PHPMAILER_LANG['connect_host'] = 'SMTP fejl: Kunne ikke tilslutte SMTP serveren.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP fejl: Data kunne ikke accepteres.'; 11 | //$PHPMAILER_LANG['empty_message'] = 'Message body empty'; 12 | $PHPMAILER_LANG['encoding'] = 'Ukendt encode-format: '; 13 | $PHPMAILER_LANG['execute'] = 'Kunne ikke køre: '; 14 | $PHPMAILER_LANG['file_access'] = 'Ingen adgang til fil: '; 15 | $PHPMAILER_LANG['file_open'] = 'Fil fejl: Kunne ikke åbne filen: '; 16 | $PHPMAILER_LANG['from_failed'] = 'Følgende afsenderadresse er forkert: '; 17 | $PHPMAILER_LANG['instantiate'] = 'Kunne ikke initialisere email funktionen.'; 18 | //$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' mailer understøttes ikke.'; 20 | $PHPMAILER_LANG['provide_address'] = 'Du skal indtaste mindst en modtagers emailadresse.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP fejl: Følgende modtagere er forkerte: '; 22 | //$PHPMAILER_LANG['signing'] = 'Signing Error: '; 23 | //$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; 24 | //$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; 25 | //$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; 26 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 27 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-vi.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'Lỗi SMTP: Không thể xác thực.'; 9 | $PHPMAILER_LANG['connect_host'] = 'Lỗi SMTP: Không thể kết nối máy chủ SMTP.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'Lỗi SMTP: Dữ liệu không được chấp nhận.'; 11 | $PHPMAILER_LANG['empty_message'] = 'Không có nội dung'; 12 | $PHPMAILER_LANG['encoding'] = 'Mã hóa không xác định: '; 13 | $PHPMAILER_LANG['execute'] = 'Không thực hiện được: '; 14 | $PHPMAILER_LANG['file_access'] = 'Không thể truy cập tệp tin '; 15 | $PHPMAILER_LANG['file_open'] = 'Lỗi Tập tin: Không thể mở tệp tin: '; 16 | $PHPMAILER_LANG['from_failed'] = 'Lỗi địa chỉ gửi đi: '; 17 | $PHPMAILER_LANG['instantiate'] = 'Không dùng được các hàm gửi thư.'; 18 | $PHPMAILER_LANG['invalid_address'] = 'Đại chỉ emai không đúng: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' trình gửi thư không được hỗ trợ.'; 20 | $PHPMAILER_LANG['provide_address'] = 'Bạn phải cung cấp ít nhất một địa chỉ người nhận.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'Lỗi SMTP: lỗi địa chỉ người nhận: '; 22 | $PHPMAILER_LANG['signing'] = 'Lỗi đăng nhập: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'Lỗi kết nối với SMTP'; 24 | $PHPMAILER_LANG['smtp_error'] = 'Lỗi máy chủ smtp '; 25 | $PHPMAILER_LANG['variable_set'] = 'Không thể thiết lập hoặc thiết lập lại biến: '; 26 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 27 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-lt.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'SMTP klaida: autentifikacija nepavyko.'; 9 | $PHPMAILER_LANG['connect_host'] = 'SMTP klaida: nepavyksta prisijungti prie SMTP stoties.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP klaida: duomenys nepriimti.'; 11 | $PHPMAILER_LANG['empty_message'] = 'Laiško turinys tuščias'; 12 | $PHPMAILER_LANG['encoding'] = 'Neatpažinta koduotė: '; 13 | $PHPMAILER_LANG['execute'] = 'Nepavyko įvykdyti komandos: '; 14 | $PHPMAILER_LANG['file_access'] = 'Byla nepasiekiama: '; 15 | $PHPMAILER_LANG['file_open'] = 'Bylos klaida: Nepavyksta atidaryti: '; 16 | $PHPMAILER_LANG['from_failed'] = 'Neteisingas siuntėjo adresas: '; 17 | $PHPMAILER_LANG['instantiate'] = 'Nepavyko paleisti mail funkcijos.'; 18 | $PHPMAILER_LANG['invalid_address'] = 'Neteisingas adresas: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' pašto stotis nepalaikoma.'; 20 | $PHPMAILER_LANG['provide_address'] = 'Nurodykite bent vieną gavėjo adresą.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP klaida: nepavyko išsiųsti šiems gavėjams: '; 22 | $PHPMAILER_LANG['signing'] = 'Prisijungimo klaida: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP susijungimo klaida'; 24 | $PHPMAILER_LANG['smtp_error'] = 'SMTP stoties klaida: '; 25 | $PHPMAILER_LANG['variable_set'] = 'Nepavyko priskirti reikšmės kintamajam: '; 26 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 27 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-nl.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'SMTP-fout: authenticatie mislukt.'; 9 | $PHPMAILER_LANG['connect_host'] = 'SMTP-fout: kon niet verbinden met SMTP-host.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP-fout: data niet geaccepteerd.'; 11 | $PHPMAILER_LANG['empty_message'] = 'Berichttekst is leeg'; 12 | $PHPMAILER_LANG['encoding'] = 'Onbekende codering: '; 13 | $PHPMAILER_LANG['execute'] = 'Kon niet uitvoeren: '; 14 | $PHPMAILER_LANG['file_access'] = 'Kreeg geen toegang tot bestand: '; 15 | $PHPMAILER_LANG['file_open'] = 'Bestandsfout: kon bestand niet openen: '; 16 | $PHPMAILER_LANG['from_failed'] = 'Het volgende afzendersadres is mislukt: '; 17 | $PHPMAILER_LANG['instantiate'] = 'Kon mailfunctie niet initialiseren.'; 18 | $PHPMAILER_LANG['invalid_address'] = 'Ongeldig adres: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' mailer wordt niet ondersteund.'; 20 | $PHPMAILER_LANG['provide_address'] = 'Er moet minstens één ontvanger worden opgegeven.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP-fout: de volgende ontvangers zijn mislukt: '; 22 | $PHPMAILER_LANG['signing'] = 'Signeerfout: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Verbinding mislukt.'; 24 | $PHPMAILER_LANG['smtp_error'] = 'SMTP-serverfout: '; 25 | $PHPMAILER_LANG['variable_set'] = 'Kan de volgende variabele niet instellen of resetten: '; 26 | $PHPMAILER_LANG['extension_missing'] = 'Extensie afwezig: '; 27 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-fo.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'SMTP feilur: Kundi ikki góðkenna.'; 9 | $PHPMAILER_LANG['connect_host'] = 'SMTP feilur: Kundi ikki knýta samband við SMTP vert.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP feilur: Data ikki góðkent.'; 11 | //$PHPMAILER_LANG['empty_message'] = 'Message body empty'; 12 | $PHPMAILER_LANG['encoding'] = 'Ókend encoding: '; 13 | $PHPMAILER_LANG['execute'] = 'Kundi ikki útføra: '; 14 | $PHPMAILER_LANG['file_access'] = 'Kundi ikki tilganga fílu: '; 15 | $PHPMAILER_LANG['file_open'] = 'Fílu feilur: Kundi ikki opna fílu: '; 16 | $PHPMAILER_LANG['from_failed'] = 'fylgjandi Frá/From adressa miseydnaðist: '; 17 | $PHPMAILER_LANG['instantiate'] = 'Kuni ikki instantiera mail funktión.'; 18 | //$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' er ikki supporterað.'; 20 | $PHPMAILER_LANG['provide_address'] = 'Tú skal uppgeva minst móttakara-emailadressu(r).'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP Feilur: Fylgjandi móttakarar miseydnaðust: '; 22 | //$PHPMAILER_LANG['signing'] = 'Signing Error: '; 23 | //$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; 24 | //$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; 25 | //$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; 26 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 27 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-eo.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'SMTP त्रुटि: प्रामाणिकता की जांच नहीं हो सका। '; 9 | $PHPMAILER_LANG['connect_host'] = 'SMTP त्रुटि: SMTP सर्वर से कनेक्ट नहीं हो सका। '; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP त्रुटि: डेटा स्वीकार नहीं किया जाता है। '; 11 | $PHPMAILER_LANG['empty_message'] = 'संदेश खाली है। '; 12 | $PHPMAILER_LANG['encoding'] = 'अज्ञात एन्कोडिंग प्रकार। '; 13 | $PHPMAILER_LANG['execute'] = 'आदेश को निष्पादित करने में विफल। '; 14 | $PHPMAILER_LANG['file_access'] = 'फ़ाइल उपलब्ध नहीं है। '; 15 | $PHPMAILER_LANG['file_open'] = 'फ़ाइल त्रुटि: फाइल को खोला नहीं जा सका। '; 16 | $PHPMAILER_LANG['from_failed'] = 'प्रेषक का पता गलत है। '; 17 | $PHPMAILER_LANG['instantiate'] = 'मेल फ़ंक्शन कॉल नहीं कर सकता है।'; 18 | $PHPMAILER_LANG['invalid_address'] = 'पता गलत है। '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = 'मेल सर्वर के साथ काम नहीं करता है। '; 20 | $PHPMAILER_LANG['provide_address'] = 'आपको कम से कम एक प्राप्तकर्ता का ई-मेल पता प्रदान करना होगा।'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP त्रुटि: निम्न प्राप्तकर्ताओं को पते भेजने में विफल। '; 22 | $PHPMAILER_LANG['signing'] = 'साइनअप त्रुटि:। '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP का connect () फ़ंक्शन विफल हुआ। '; 24 | $PHPMAILER_LANG['smtp_error'] = 'SMTP सर्वर त्रुटि। '; 25 | $PHPMAILER_LANG['variable_set'] = 'चर को बना या संशोधित नहीं किया जा सकता। '; 26 | $PHPMAILER_LANG['extension_missing'] = 'एक्सटेन्षन गायब है: '; 27 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-ar.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'خطأ SMTP : لا يمكن تأكيد الهوية.'; 9 | $PHPMAILER_LANG['connect_host'] = 'خطأ SMTP: لا يمكن الاتصال بالخادم SMTP.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'خطأ SMTP: لم يتم قبول المعلومات .'; 11 | $PHPMAILER_LANG['empty_message'] = 'نص الرسالة فارغ'; 12 | $PHPMAILER_LANG['encoding'] = 'ترميز غير معروف: '; 13 | $PHPMAILER_LANG['execute'] = 'لا يمكن تنفيذ : '; 14 | $PHPMAILER_LANG['file_access'] = 'لا يمكن الوصول للملف: '; 15 | $PHPMAILER_LANG['file_open'] = 'خطأ في الملف: لا يمكن فتحه: '; 16 | $PHPMAILER_LANG['from_failed'] = 'خطأ على مستوى عنوان المرسل : '; 17 | $PHPMAILER_LANG['instantiate'] = 'لا يمكن توفير خدمة البريد.'; 18 | $PHPMAILER_LANG['invalid_address'] = 'الإرسال غير ممكن لأن عنوان البريد الإلكتروني غير صالح: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' برنامج الإرسال غير مدعوم.'; 20 | $PHPMAILER_LANG['provide_address'] = 'يجب توفير عنوان البريد الإلكتروني لمستلم واحد على الأقل.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'خطأ SMTP: الأخطاء التالية ' . 22 | 'فشل في الارسال لكل من : '; 23 | $PHPMAILER_LANG['signing'] = 'خطأ في التوقيع: '; 24 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() غير ممكن.'; 25 | $PHPMAILER_LANG['smtp_error'] = 'خطأ على مستوى الخادم SMTP: '; 26 | $PHPMAILER_LANG['variable_set'] = 'لا يمكن تعيين أو إعادة تعيين متغير: '; 27 | $PHPMAILER_LANG['extension_missing'] = 'الإضافة غير موجودة: '; 28 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-fa.php: -------------------------------------------------------------------------------- 1 | 6 | * @author Mohammad Hossein Mojtahedi 7 | */ 8 | 9 | $PHPMAILER_LANG['authenticate'] = 'خطای SMTP: احراز هویت با شکست مواجه شد.'; 10 | $PHPMAILER_LANG['connect_host'] = 'خطای SMTP: اتصال به سرور SMTP برقرار نشد.'; 11 | $PHPMAILER_LANG['data_not_accepted'] = 'خطای SMTP: داده‌ها نا‌درست هستند.'; 12 | $PHPMAILER_LANG['empty_message'] = 'بخش متن پیام خالی است.'; 13 | $PHPMAILER_LANG['encoding'] = 'کد‌گذاری نا‌شناخته: '; 14 | $PHPMAILER_LANG['execute'] = 'امکان اجرا وجود ندارد: '; 15 | $PHPMAILER_LANG['file_access'] = 'امکان دسترسی به فایل وجود ندارد: '; 16 | $PHPMAILER_LANG['file_open'] = 'خطای File: امکان بازکردن فایل وجود ندارد: '; 17 | $PHPMAILER_LANG['from_failed'] = 'آدرس فرستنده اشتباه است: '; 18 | $PHPMAILER_LANG['instantiate'] = 'امکان معرفی تابع ایمیل وجود ندارد.'; 19 | $PHPMAILER_LANG['invalid_address'] = 'آدرس ایمیل معتبر نیست: '; 20 | $PHPMAILER_LANG['mailer_not_supported'] = ' mailer پشتیبانی نمی‌شود.'; 21 | $PHPMAILER_LANG['provide_address'] = 'باید حداقل یک آدرس گیرنده وارد کنید.'; 22 | $PHPMAILER_LANG['recipients_failed'] = 'خطای SMTP: ارسال به آدرس گیرنده با خطا مواجه شد: '; 23 | $PHPMAILER_LANG['signing'] = 'خطا در امضا: '; 24 | $PHPMAILER_LANG['smtp_connect_failed'] = 'خطا در اتصال به SMTP.'; 25 | $PHPMAILER_LANG['smtp_error'] = 'خطا در SMTP Server: '; 26 | $PHPMAILER_LANG['variable_set'] = 'امکان ارسال یا ارسال مجدد متغیر‌ها وجود ندارد: '; 27 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 28 | -------------------------------------------------------------------------------- /status.php: -------------------------------------------------------------------------------- 1 | sql = $conn; 6 | } 7 | 8 | public function getRow($tablename) { 9 | $this->commed = mysqli_fetch_assoc(mysqli_query($this->sql,"select * from `TABLES` where `TABLE_NAME`='$tablename'")); 10 | $this->num = $this->commed['TABLE_ROWS']; 11 | //所有数据 12 | echo $this->num; 13 | } 14 | } 15 | 16 | class status { 17 | var $conn; 18 | var $seconds; 19 | 20 | function __construct($conn) { 21 | $this->sql = $conn; 22 | } 23 | 24 | function getRuntime() { 25 | $this->Starttime = strtotime("2020-02-01"); //开始时间 26 | $this->Nowtime = strtotime(date("Y-m-d")); 27 | $this->diff = $this->Nowtime - $this->Starttime; 28 | $this->Runtime = abs(round($this->diff / 86400)); 29 | echo $this->Runtime; 30 | } 31 | } 32 | // 服务是否在运行 | 已发送 | 未发送 | 发送时间段 | 累计运行时间段 33 | 34 | $status = new status($conn); 35 | $row = new Row($conns); 36 | 37 | ?> 38 |
39 | Status 40 |
41 |
42 |
43 |
44 |
45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 |
运行天数getRuntime();?>天
已发送getRow("sent");?>封
待发送getRow("waiting");?>封
61 |
62 | 63 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-am.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'SMTP -ի սխալ: չհաջողվեց ստուգել իսկությունը.'; 9 | $PHPMAILER_LANG['connect_host'] = 'SMTP -ի սխալ: չհաջողվեց կապ հաստատել SMTP սերվերի հետ.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP -ի սխալ: տվյալները ընդունված չեն.'; 11 | $PHPMAILER_LANG['empty_message'] = 'Հաղորդագրությունը դատարկ է'; 12 | $PHPMAILER_LANG['encoding'] = 'Կոդավորման անհայտ տեսակ: '; 13 | $PHPMAILER_LANG['execute'] = 'Չհաջողվեց իրականացնել հրամանը: '; 14 | $PHPMAILER_LANG['file_access'] = 'Ֆայլը հասանելի չէ: '; 15 | $PHPMAILER_LANG['file_open'] = 'Ֆայլի սխալ: ֆայլը չհաջողվեց բացել: '; 16 | $PHPMAILER_LANG['from_failed'] = 'Ուղարկողի հետևյալ հասցեն սխալ է: '; 17 | $PHPMAILER_LANG['instantiate'] = 'Հնարավոր չէ կանչել mail ֆունկցիան.'; 18 | $PHPMAILER_LANG['invalid_address'] = 'Հասցեն սխալ է: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' փոստային սերվերի հետ չի աշխատում.'; 20 | $PHPMAILER_LANG['provide_address'] = 'Անհրաժեշտ է տրամադրել գոնե մեկ ստացողի e-mail հասցե.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP -ի սխալ: չի հաջողվել ուղարկել հետևյալ ստացողների հասցեներին: '; 22 | $PHPMAILER_LANG['signing'] = 'Ստորագրման սխալ: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP -ի connect() ֆունկցիան չի հաջողվել'; 24 | $PHPMAILER_LANG['smtp_error'] = 'SMTP սերվերի սխալ: '; 25 | $PHPMAILER_LANG['variable_set'] = 'Չի հաջողվում ստեղծել կամ վերափոխել փոփոխականը: '; 26 | $PHPMAILER_LANG['extension_missing'] = 'Հավելվածը բացակայում է: '; 27 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-be.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'Памылка SMTP: памылка ідэнтыфікацыі.'; 9 | $PHPMAILER_LANG['connect_host'] = 'Памылка SMTP: нельга ўстанавіць сувязь з SMTP-серверам.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'Памылка SMTP: звесткі непрынятыя.'; 11 | $PHPMAILER_LANG['empty_message'] = 'Пустое паведамленне.'; 12 | $PHPMAILER_LANG['encoding'] = 'Невядомая кадыроўка тэксту: '; 13 | $PHPMAILER_LANG['execute'] = 'Нельга выканаць каманду: '; 14 | $PHPMAILER_LANG['file_access'] = 'Няма доступу да файла: '; 15 | $PHPMAILER_LANG['file_open'] = 'Нельга адкрыць файл: '; 16 | $PHPMAILER_LANG['from_failed'] = 'Няправільны адрас адпраўніка: '; 17 | $PHPMAILER_LANG['instantiate'] = 'Нельга прымяніць функцыю mail().'; 18 | $PHPMAILER_LANG['invalid_address'] = 'Нельга даслаць паведамленне, няправільны email атрымальніка: '; 19 | $PHPMAILER_LANG['provide_address'] = 'Запоўніце, калі ласка, правільны email атрымальніка.'; 20 | $PHPMAILER_LANG['mailer_not_supported'] = ' - паштовы сервер не падтрымліваецца.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'Памылка SMTP: няправільныя атрымальнікі: '; 22 | $PHPMAILER_LANG['signing'] = 'Памылка подпісу паведамлення: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'Памылка сувязі з SMTP-серверам.'; 24 | $PHPMAILER_LANG['smtp_error'] = 'Памылка SMTP: '; 25 | $PHPMAILER_LANG['variable_set'] = 'Нельга ўстанавіць або перамяніць значэнне пераменнай: '; 26 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 27 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-bg.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'SMTP грешка: Не може да се удостовери пред сървъра.'; 9 | $PHPMAILER_LANG['connect_host'] = 'SMTP грешка: Не може да се свърже с SMTP хоста.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP грешка: данните не са приети.'; 11 | $PHPMAILER_LANG['empty_message'] = 'Съдържанието на съобщението е празно'; 12 | $PHPMAILER_LANG['encoding'] = 'Неизвестно кодиране: '; 13 | $PHPMAILER_LANG['execute'] = 'Не може да се изпълни: '; 14 | $PHPMAILER_LANG['file_access'] = 'Няма достъп до файл: '; 15 | $PHPMAILER_LANG['file_open'] = 'Файлова грешка: Не може да се отвори файл: '; 16 | $PHPMAILER_LANG['from_failed'] = 'Следните адреси за подател са невалидни: '; 17 | $PHPMAILER_LANG['instantiate'] = 'Не може да се инстанцира функцията mail.'; 18 | $PHPMAILER_LANG['invalid_address'] = 'Невалиден адрес: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' - пощенски сървър не се поддържа.'; 20 | $PHPMAILER_LANG['provide_address'] = 'Трябва да предоставите поне един email адрес за получател.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP грешка: Следните адреси за Получател са невалидни: '; 22 | $PHPMAILER_LANG['signing'] = 'Грешка при подписване: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP провален connect().'; 24 | $PHPMAILER_LANG['smtp_error'] = 'SMTP сървърна грешка: '; 25 | $PHPMAILER_LANG['variable_set'] = 'Не може да се установи или възстанови променлива: '; 26 | $PHPMAILER_LANG['extension_missing'] = 'Липсва разширение: '; 27 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-ca.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'Error SMTP: No s’ha pogut autenticar.'; 9 | $PHPMAILER_LANG['connect_host'] = 'Error SMTP: No es pot connectar al servidor SMTP.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'Error SMTP: Dades no acceptades.'; 11 | $PHPMAILER_LANG['empty_message'] = 'El cos del missatge està buit.'; 12 | $PHPMAILER_LANG['encoding'] = 'Codificació desconeguda: '; 13 | $PHPMAILER_LANG['execute'] = 'No es pot executar: '; 14 | $PHPMAILER_LANG['file_access'] = 'No es pot accedir a l’arxiu: '; 15 | $PHPMAILER_LANG['file_open'] = 'Error d’Arxiu: No es pot obrir l’arxiu: '; 16 | $PHPMAILER_LANG['from_failed'] = 'La(s) següent(s) adreces de remitent han fallat: '; 17 | $PHPMAILER_LANG['instantiate'] = 'No s’ha pogut crear una instància de la funció Mail.'; 18 | $PHPMAILER_LANG['invalid_address'] = 'Adreça d’email invalida: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' mailer no està suportat'; 20 | $PHPMAILER_LANG['provide_address'] = 'S’ha de proveir almenys una adreça d’email com a destinatari.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'Error SMTP: Els següents destinataris han fallat: '; 22 | $PHPMAILER_LANG['signing'] = 'Error al signar: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'Ha fallat el SMTP Connect().'; 24 | $PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: '; 25 | $PHPMAILER_LANG['variable_set'] = 'No s’ha pogut establir o restablir la variable: '; 26 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 27 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-tl.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | 9 | $PHPMAILER_LANG['authenticate'] = 'SMTP Error: Hindi mapatotohanan.'; 10 | $PHPMAILER_LANG['connect_host'] = 'SMTP Error: Hindi makakonekta sa SMTP host.'; 11 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Ang datos ay hindi maaaring matatanggap.'; 12 | $PHPMAILER_LANG['empty_message'] = 'Walang laman ang mensahe'; 13 | $PHPMAILER_LANG['encoding'] = 'Hindi alam ang encoding: '; 14 | $PHPMAILER_LANG['execute'] = 'Hindi maisasagawa: '; 15 | $PHPMAILER_LANG['file_access'] = 'Hindi ma-access ang file: '; 16 | $PHPMAILER_LANG['file_open'] = 'Hindi mabuksan ang file: '; 17 | $PHPMAILER_LANG['from_failed'] = 'Ang sumusunod na address ay nabigo: '; 18 | $PHPMAILER_LANG['instantiate'] = 'Hindi maaaring magbigay ng institusyon ang mail'; 19 | $PHPMAILER_LANG['invalid_address'] = 'Hindi wasto ang address na naibigay: '; 20 | $PHPMAILER_LANG['mailer_not_supported'] = 'Ang mailer ay hindi suportado'; 21 | $PHPMAILER_LANG['provide_address'] = 'Kailangan mong magbigay ng kahit isang email address na tatanggap'; 22 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: Ang mga sumusunod na tatanggap ay nabigo: '; 23 | $PHPMAILER_LANG['signing'] = 'Hindi ma-sign'; 24 | $PHPMAILER_LANG['smtp_connect_failed'] = 'Ang SMTP connect() ay nabigo'; 25 | $PHPMAILER_LANG['smtp_error'] = 'Ang server ng SMTP ay nabigo'; 26 | $PHPMAILER_LANG['variable_set'] = 'Hindi matatakda ang mga variables: '; 27 | $PHPMAILER_LANG['extension_missing'] = 'Nawawala ang extension'; 28 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-es.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'Error SMTP: Imposible autentificar.'; 9 | $PHPMAILER_LANG['connect_host'] = 'Error SMTP: Imposible conectar al servidor SMTP.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'Error SMTP: Datos no aceptados.'; 11 | $PHPMAILER_LANG['empty_message'] = 'El cuerpo del mensaje está vacío.'; 12 | $PHPMAILER_LANG['encoding'] = 'Codificación desconocida: '; 13 | $PHPMAILER_LANG['execute'] = 'Imposible ejecutar: '; 14 | $PHPMAILER_LANG['file_access'] = 'Imposible acceder al archivo: '; 15 | $PHPMAILER_LANG['file_open'] = 'Error de Archivo: Imposible abrir el archivo: '; 16 | $PHPMAILER_LANG['from_failed'] = 'La(s) siguiente(s) direcciones de remitente fallaron: '; 17 | $PHPMAILER_LANG['instantiate'] = 'Imposible crear una instancia de la función Mail.'; 18 | $PHPMAILER_LANG['invalid_address'] = 'Imposible enviar: dirección de email inválido: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' mailer no está soportado.'; 20 | $PHPMAILER_LANG['provide_address'] = 'Debe proporcionar al menos una dirección de email de destino.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'Error SMTP: Los siguientes destinos fallaron: '; 22 | $PHPMAILER_LANG['signing'] = 'Error al firmar: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falló.'; 24 | $PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: '; 25 | $PHPMAILER_LANG['variable_set'] = 'No se pudo configurar la variable: '; 26 | $PHPMAILER_LANG['extension_missing'] = 'Extensión faltante: '; 27 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-ba.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'SMTP Greška: Neuspjela prijava.'; 9 | $PHPMAILER_LANG['connect_host'] = 'SMTP Greška: Nije moguće spojiti se sa SMTP serverom.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP Greška: Podatci nisu prihvaćeni.'; 11 | $PHPMAILER_LANG['empty_message'] = 'Sadržaj poruke je prazan.'; 12 | $PHPMAILER_LANG['encoding'] = 'Nepoznata kriptografija: '; 13 | $PHPMAILER_LANG['execute'] = 'Nije moguće izvršiti naredbu: '; 14 | $PHPMAILER_LANG['file_access'] = 'Nije moguće pristupiti datoteci: '; 15 | $PHPMAILER_LANG['file_open'] = 'Nije moguće otvoriti datoteku: '; 16 | $PHPMAILER_LANG['from_failed'] = 'SMTP Greška: Slanje sa navedenih e-mail adresa nije uspjelo: '; 17 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP Greška: Slanje na navedene e-mail adrese nije uspjelo: '; 18 | $PHPMAILER_LANG['instantiate'] = 'Ne mogu pokrenuti mail funkcionalnost.'; 19 | $PHPMAILER_LANG['invalid_address'] = 'E-mail nije poslan. Neispravna e-mail adresa: '; 20 | $PHPMAILER_LANG['mailer_not_supported'] = ' mailer nije podržan.'; 21 | $PHPMAILER_LANG['provide_address'] = 'Definišite barem jednu adresu primaoca.'; 22 | $PHPMAILER_LANG['signing'] = 'Greška prilikom prijave: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'Spajanje na SMTP server nije uspjelo.'; 24 | $PHPMAILER_LANG['smtp_error'] = 'SMTP greška: '; 25 | $PHPMAILER_LANG['variable_set'] = 'Nije moguće postaviti varijablu ili je vratiti nazad: '; 26 | $PHPMAILER_LANG['extension_missing'] = 'Nedostaje ekstenzija: '; -------------------------------------------------------------------------------- /email/language/phpmailer.lang-fi.php: -------------------------------------------------------------------------------- 1 | 6 | * @author Peter Orlický 7 | */ 8 | 9 | $PHPMAILER_LANG['authenticate'] = 'SMTP Error: Chyba autentifikácie.'; 10 | $PHPMAILER_LANG['connect_host'] = 'SMTP Error: Nebolo možné nadviazať spojenie so SMTP serverom.'; 11 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Dáta neboli prijaté'; 12 | $PHPMAILER_LANG['empty_message'] = 'Prázdne telo správy.'; 13 | $PHPMAILER_LANG['encoding'] = 'Neznáme kódovanie: '; 14 | $PHPMAILER_LANG['execute'] = 'Nedá sa vykonať: '; 15 | $PHPMAILER_LANG['file_access'] = 'Súbor nebol nájdený: '; 16 | $PHPMAILER_LANG['file_open'] = 'File Error: Súbor sa otvoriť pre čítanie: '; 17 | $PHPMAILER_LANG['from_failed'] = 'Následujúca adresa From je nesprávna: '; 18 | $PHPMAILER_LANG['instantiate'] = 'Nedá sa vytvoriť inštancia emailovej funkcie.'; 19 | $PHPMAILER_LANG['invalid_address'] = 'Neodoslané, emailová adresa je nesprávna: '; 20 | $PHPMAILER_LANG['mailer_not_supported'] = ' emailový klient nieje podporovaný.'; 21 | $PHPMAILER_LANG['provide_address'] = 'Musíte zadať aspoň jednu emailovú adresu príjemcu.'; 22 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: Adresy príjemcov niesu správne '; 23 | $PHPMAILER_LANG['signing'] = 'Chyba prihlasovania: '; 24 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() zlyhalo.'; 25 | $PHPMAILER_LANG['smtp_error'] = 'SMTP chyba serveru: '; 26 | $PHPMAILER_LANG['variable_set'] = 'Nemožno nastaviť alebo resetovať premennú: '; 27 | $PHPMAILER_LANG['extension_missing'] = 'Chýba rozšírenie: '; 28 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-et.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | 9 | $PHPMAILER_LANG['authenticate'] = 'SMTP Viga: Autoriseerimise viga.'; 10 | $PHPMAILER_LANG['connect_host'] = 'SMTP Viga: Ei õnnestunud luua ühendust SMTP serveriga.'; 11 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP Viga: Vigased andmed.'; 12 | $PHPMAILER_LANG['empty_message'] = 'Tühi kirja sisu'; 13 | $PHPMAILER_LANG["encoding"] = 'Tundmatu kodeering: '; 14 | $PHPMAILER_LANG['execute'] = 'Tegevus ebaõnnestus: '; 15 | $PHPMAILER_LANG['file_access'] = 'Pole piisavalt õiguseid järgneva faili avamiseks: '; 16 | $PHPMAILER_LANG['file_open'] = 'Faili Viga: Faili avamine ebaõnnestus: '; 17 | $PHPMAILER_LANG['from_failed'] = 'Järgnev saatja e-posti aadress on vigane: '; 18 | $PHPMAILER_LANG['instantiate'] = 'mail funktiooni käivitamine ebaõnnestus.'; 19 | $PHPMAILER_LANG['invalid_address'] = 'Saatmine peatatud, e-posti address vigane: '; 20 | $PHPMAILER_LANG['provide_address'] = 'Te peate määrama vähemalt ühe saaja e-posti aadressi.'; 21 | $PHPMAILER_LANG['mailer_not_supported'] = ' maileri tugi puudub.'; 22 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP Viga: Järgnevate saajate e-posti aadressid on vigased: '; 23 | $PHPMAILER_LANG["signing"] = 'Viga allkirjastamisel: '; 24 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() ebaõnnestus.'; 25 | $PHPMAILER_LANG['smtp_error'] = 'SMTP serveri viga: '; 26 | $PHPMAILER_LANG['variable_set'] = 'Ei õnnestunud määrata või lähtestada muutujat: '; 27 | $PHPMAILER_LANG['extension_missing'] = 'Nõutud laiendus on puudu: '; 28 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-gl.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'Erro SMTP: Non puido ser autentificado.'; 9 | $PHPMAILER_LANG['connect_host'] = 'Erro SMTP: Non puido conectar co servidor SMTP.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'Erro SMTP: Datos non aceptados.'; 11 | $PHPMAILER_LANG['empty_message'] = 'Corpo da mensaxe vacía'; 12 | $PHPMAILER_LANG['encoding'] = 'Codificación descoñecida: '; 13 | $PHPMAILER_LANG['execute'] = 'Non puido ser executado: '; 14 | $PHPMAILER_LANG['file_access'] = 'Nob puido acceder ó arquivo: '; 15 | $PHPMAILER_LANG['file_open'] = 'Erro de Arquivo: No puido abrir o arquivo: '; 16 | $PHPMAILER_LANG['from_failed'] = 'A(s) seguinte(s) dirección(s) de remitente(s) deron erro: '; 17 | $PHPMAILER_LANG['instantiate'] = 'Non puido crear unha instancia da función Mail.'; 18 | $PHPMAILER_LANG['invalid_address'] = 'Non puido envia-lo correo: dirección de email inválida: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' mailer non está soportado.'; 20 | $PHPMAILER_LANG['provide_address'] = 'Debe engadir polo menos unha dirección de email coma destino.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'Erro SMTP: Os seguintes destinos fallaron: '; 22 | $PHPMAILER_LANG['signing'] = 'Erro ó firmar: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() fallou.'; 24 | $PHPMAILER_LANG['smtp_error'] = 'Erro do servidor SMTP: '; 25 | $PHPMAILER_LANG['variable_set'] = 'Non puidemos axustar ou reaxustar a variábel: '; 26 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 27 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-ro.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'Eroare SMTP: Autentificarea a eșuat.'; 9 | $PHPMAILER_LANG['connect_host'] = 'Eroare SMTP: Conectarea la serverul SMTP a eșuat.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'Eroare SMTP: Datele nu au fost acceptate.'; 11 | $PHPMAILER_LANG['empty_message'] = 'Mesajul este gol.'; 12 | $PHPMAILER_LANG['encoding'] = 'Encodare necunoscută: '; 13 | $PHPMAILER_LANG['execute'] = 'Nu se poate executa următoarea comandă: '; 14 | $PHPMAILER_LANG['file_access'] = 'Nu se poate accesa următorul fișier: '; 15 | $PHPMAILER_LANG['file_open'] = 'Eroare fișier: Nu se poate deschide următorul fișier: '; 16 | $PHPMAILER_LANG['from_failed'] = 'Următoarele adrese From au dat eroare: '; 17 | $PHPMAILER_LANG['instantiate'] = 'Funcția mail nu a putut fi inițializată.'; 18 | $PHPMAILER_LANG['invalid_address'] = 'Adresa de email nu este validă: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' mailer nu este suportat.'; 20 | $PHPMAILER_LANG['provide_address'] = 'Trebuie să adăugați cel puțin o adresă de email.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'Eroare SMTP: Următoarele adrese de email au eșuat: '; 22 | $PHPMAILER_LANG['signing'] = 'A aparut o problemă la semnarea emailului. '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'Conectarea la serverul SMTP a eșuat.'; 24 | $PHPMAILER_LANG['smtp_error'] = 'Eroare server SMTP: '; 25 | $PHPMAILER_LANG['variable_set'] = 'Nu se poate seta/reseta variabila. '; 26 | $PHPMAILER_LANG['extension_missing'] = 'Lipsește extensia: '; 27 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-tr.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'SMTP Greška: Neuspjela autentikacija.'; 9 | $PHPMAILER_LANG['connect_host'] = 'SMTP Greška: Ne mogu se spojiti na SMTP poslužitelj.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP Greška: Podatci nisu prihvaćeni.'; 11 | $PHPMAILER_LANG['empty_message'] = 'Sadržaj poruke je prazan.'; 12 | $PHPMAILER_LANG['encoding'] = 'Nepoznati encoding: '; 13 | $PHPMAILER_LANG['execute'] = 'Nije moguće izvršiti naredbu: '; 14 | $PHPMAILER_LANG['file_access'] = 'Nije moguće pristupiti datoteci: '; 15 | $PHPMAILER_LANG['file_open'] = 'Nije moguće otvoriti datoteku: '; 16 | $PHPMAILER_LANG['from_failed'] = 'SMTP Greška: Slanje s navedenih e-mail adresa nije uspjelo: '; 17 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP Greška: Slanje na navedenih e-mail adresa nije uspjelo: '; 18 | $PHPMAILER_LANG['instantiate'] = 'Ne mogu pokrenuti mail funkcionalnost.'; 19 | $PHPMAILER_LANG['invalid_address'] = 'E-mail nije poslan. Neispravna e-mail adresa: '; 20 | $PHPMAILER_LANG['mailer_not_supported'] = ' mailer nije podržan.'; 21 | $PHPMAILER_LANG['provide_address'] = 'Definirajte barem jednu adresu primatelja.'; 22 | $PHPMAILER_LANG['signing'] = 'Greška prilikom prijave: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'Spajanje na SMTP poslužitelj nije uspjelo.'; 24 | $PHPMAILER_LANG['smtp_error'] = 'Greška SMTP poslužitelja: '; 25 | $PHPMAILER_LANG['variable_set'] = 'Ne mogu postaviti varijablu niti ju vratiti nazad: '; 26 | $PHPMAILER_LANG['extension_missing'] = 'Nedostaje proširenje: '; 27 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-ms.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'Ralat SMTP: Tidak dapat pengesahan.'; 9 | $PHPMAILER_LANG['connect_host'] = 'Ralat SMTP: Tidak dapat menghubungi hos pelayan SMTP.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'Ralat SMTP: Data tidak diterima oleh pelayan.'; 11 | $PHPMAILER_LANG['empty_message'] = 'Tiada isi untuk mesej'; 12 | $PHPMAILER_LANG['encoding'] = 'Pengekodan tidak diketahui: '; 13 | $PHPMAILER_LANG['execute'] = 'Tidak dapat melaksanakan: '; 14 | $PHPMAILER_LANG['file_access'] = 'Tidak dapat mengakses fail: '; 15 | $PHPMAILER_LANG['file_open'] = 'Ralat Fail: Tidak dapat membuka fail: '; 16 | $PHPMAILER_LANG['from_failed'] = 'Berikut merupakan ralat dari alamat e-mel: '; 17 | $PHPMAILER_LANG['instantiate'] = 'Tidak dapat memberi contoh fungsi e-mel.'; 18 | $PHPMAILER_LANG['invalid_address'] = 'Alamat emel tidak sah: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' jenis penghantar emel tidak disokong.'; 20 | $PHPMAILER_LANG['provide_address'] = 'Anda perlu menyediakan sekurang-kurangnya satu alamat e-mel penerima.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'Ralat SMTP: Penerima e-mel berikut telah gagal: '; 22 | $PHPMAILER_LANG['signing'] = 'Ralat pada tanda tangan: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() telah gagal.'; 24 | $PHPMAILER_LANG['smtp_error'] = 'Ralat pada pelayan SMTP: '; 25 | $PHPMAILER_LANG['variable_set'] = 'Tidak boleh menetapkan atau menetapkan semula pembolehubah: '; 26 | $PHPMAILER_LANG['extension_missing'] = 'Sambungan hilang: '; 27 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-de.php: -------------------------------------------------------------------------------- 1 | 6 | * @author Foster Snowhill 7 | */ 8 | 9 | $PHPMAILER_LANG['authenticate'] = 'Ошибка SMTP: ошибка авторизации.'; 10 | $PHPMAILER_LANG['connect_host'] = 'Ошибка SMTP: не удается подключиться к SMTP-серверу.'; 11 | $PHPMAILER_LANG['data_not_accepted'] = 'Ошибка SMTP: данные не приняты.'; 12 | $PHPMAILER_LANG['encoding'] = 'Неизвестная кодировка: '; 13 | $PHPMAILER_LANG['execute'] = 'Невозможно выполнить команду: '; 14 | $PHPMAILER_LANG['file_access'] = 'Нет доступа к файлу: '; 15 | $PHPMAILER_LANG['file_open'] = 'Файловая ошибка: не удаётся открыть файл: '; 16 | $PHPMAILER_LANG['from_failed'] = 'Неверный адрес отправителя: '; 17 | $PHPMAILER_LANG['instantiate'] = 'Невозможно запустить функцию mail().'; 18 | $PHPMAILER_LANG['provide_address'] = 'Пожалуйста, введите хотя бы один email-адрес получателя.'; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' — почтовый сервер не поддерживается.'; 20 | $PHPMAILER_LANG['recipients_failed'] = 'Ошибка SMTP: не удалась отправка таким адресатам: '; 21 | $PHPMAILER_LANG['empty_message'] = 'Пустое сообщение'; 22 | $PHPMAILER_LANG['invalid_address'] = 'Не отправлено из-за неправильного формата email-адреса: '; 23 | $PHPMAILER_LANG['signing'] = 'Ошибка подписи: '; 24 | $PHPMAILER_LANG['smtp_connect_failed'] = 'Ошибка соединения с SMTP-сервером'; 25 | $PHPMAILER_LANG['smtp_error'] = 'Ошибка SMTP-сервера: '; 26 | $PHPMAILER_LANG['variable_set'] = 'Невозможно установить или сбросить переменную: '; 27 | $PHPMAILER_LANG['extension_missing'] = 'Расширение отсутствует: '; 28 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-pl.php: -------------------------------------------------------------------------------- 1 | 6 | * @author Filip Š 7 | */ 8 | 9 | $PHPMAILER_LANG['authenticate'] = 'SMTP napaka: Avtentikacija ni uspela.'; 10 | $PHPMAILER_LANG['connect_host'] = 'SMTP napaka: Vzpostavljanje povezave s SMTP gostiteljem ni uspelo.'; 11 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP napaka: Strežnik zavrača podatke.'; 12 | $PHPMAILER_LANG['empty_message'] = 'E-poštno sporočilo nima vsebine.'; 13 | $PHPMAILER_LANG['encoding'] = 'Nepoznan tip kodiranja: '; 14 | $PHPMAILER_LANG['execute'] = 'Operacija ni uspela: '; 15 | $PHPMAILER_LANG['file_access'] = 'Nimam dostopa do datoteke: '; 16 | $PHPMAILER_LANG['file_open'] = 'Ne morem odpreti datoteke: '; 17 | $PHPMAILER_LANG['from_failed'] = 'Neveljaven e-naslov pošiljatelja: '; 18 | $PHPMAILER_LANG['instantiate'] = 'Ne morem inicializirati mail funkcije.'; 19 | $PHPMAILER_LANG['invalid_address'] = 'E-poštno sporočilo ni bilo poslano. E-naslov je neveljaven: '; 20 | $PHPMAILER_LANG['mailer_not_supported'] = ' mailer ni podprt.'; 21 | $PHPMAILER_LANG['provide_address'] = 'Prosim vnesite vsaj enega naslovnika.'; 22 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP napaka: Sledeči naslovniki so neveljavni: '; 23 | $PHPMAILER_LANG['signing'] = 'Napaka pri podpisovanju: '; 24 | $PHPMAILER_LANG['smtp_connect_failed'] = 'Ne morem vzpostaviti povezave s SMTP strežnikom.'; 25 | $PHPMAILER_LANG['smtp_error'] = 'Napaka SMTP strežnika: '; 26 | $PHPMAILER_LANG['variable_set'] = 'Ne morem nastaviti oz. ponastaviti spremenljivke: '; 27 | $PHPMAILER_LANG['extension_missing'] = 'Manjkajoča razširitev: '; 28 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-uk.php: -------------------------------------------------------------------------------- 1 | 6 | * @fixed by Boris Yurchenko 7 | */ 8 | 9 | $PHPMAILER_LANG['authenticate'] = 'Помилка SMTP: помилка авторизації.'; 10 | $PHPMAILER_LANG['connect_host'] = 'Помилка SMTP: не вдається під\'єднатися до SMTP-серверу.'; 11 | $PHPMAILER_LANG['data_not_accepted'] = 'Помилка SMTP: дані не прийнято.'; 12 | $PHPMAILER_LANG['encoding'] = 'Невідоме кодування: '; 13 | $PHPMAILER_LANG['execute'] = 'Неможливо виконати команду: '; 14 | $PHPMAILER_LANG['file_access'] = 'Немає доступу до файлу: '; 15 | $PHPMAILER_LANG['file_open'] = 'Помилка файлової системи: не вдається відкрити файл: '; 16 | $PHPMAILER_LANG['from_failed'] = 'Невірна адреса відправника: '; 17 | $PHPMAILER_LANG['instantiate'] = 'Неможливо запустити функцію mail().'; 18 | $PHPMAILER_LANG['provide_address'] = 'Будь-ласка, введіть хоча б одну email-адресу отримувача.'; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' - поштовий сервер не підтримується.'; 20 | $PHPMAILER_LANG['recipients_failed'] = 'Помилка SMTP: не вдалося відправлення для таких отримувачів: '; 21 | $PHPMAILER_LANG['empty_message'] = 'Пусте повідомлення'; 22 | $PHPMAILER_LANG['invalid_address'] = 'Не відправлено через невірний формат email-адреси: '; 23 | $PHPMAILER_LANG['signing'] = 'Помилка підпису: '; 24 | $PHPMAILER_LANG['smtp_connect_failed'] = 'Помилка з\'єднання з SMTP-сервером'; 25 | $PHPMAILER_LANG['smtp_error'] = 'Помилка SMTP-сервера: '; 26 | $PHPMAILER_LANG['variable_set'] = 'Неможливо встановити або скинути змінну: '; 27 | $PHPMAILER_LANG['extension_missing'] = 'Розширення відсутнє: '; 28 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-ka.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'SMTP შეცდომა: ავტორიზაცია შეუძლებელია.'; 9 | $PHPMAILER_LANG['connect_host'] = 'SMTP შეცდომა: SMTP სერვერთან დაკავშირება შეუძლებელია.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP შეცდომა: მონაცემები არ იქნა მიღებული.'; 11 | $PHPMAILER_LANG['encoding'] = 'კოდირების უცნობი ტიპი: '; 12 | $PHPMAILER_LANG['execute'] = 'შეუძლებელია შემდეგი ბრძანების შესრულება: '; 13 | $PHPMAILER_LANG['file_access'] = 'შეუძლებელია წვდომა ფაილთან: '; 14 | $PHPMAILER_LANG['file_open'] = 'ფაილური სისტემის შეცდომა: არ იხსნება ფაილი: '; 15 | $PHPMAILER_LANG['from_failed'] = 'გამგზავნის არასწორი მისამართი: '; 16 | $PHPMAILER_LANG['instantiate'] = 'mail ფუნქციის გაშვება ვერ ხერხდება.'; 17 | $PHPMAILER_LANG['provide_address'] = 'გთხოვთ მიუთითოთ ერთი ადრესატის e-mail მისამართი მაინც.'; 18 | $PHPMAILER_LANG['mailer_not_supported'] = ' - საფოსტო სერვერის მხარდაჭერა არ არის.'; 19 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP შეცდომა: შემდეგ მისამართებზე გაგზავნა ვერ მოხერხდა: '; 20 | $PHPMAILER_LANG['empty_message'] = 'შეტყობინება ცარიელია'; 21 | $PHPMAILER_LANG['invalid_address'] = 'არ გაიგზავნა, e-mail მისამართის არასწორი ფორმატი: '; 22 | $PHPMAILER_LANG['signing'] = 'ხელმოწერის შეცდომა: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'შეცდომა SMTP სერვერთან დაკავშირებისას'; 24 | $PHPMAILER_LANG['smtp_error'] = 'SMTP სერვერის შეცდომა: '; 25 | $PHPMAILER_LANG['variable_set'] = 'შეუძლებელია შემდეგი ცვლადის შექმნა ან შეცვლა: '; 26 | $PHPMAILER_LANG['extension_missing'] = 'ბიბლიოთეკა არ არსებობს: '; 27 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-sr.php: -------------------------------------------------------------------------------- 1 | 6 | * @author Miloš Milanović 7 | */ 8 | 9 | $PHPMAILER_LANG['authenticate'] = 'SMTP грешка: аутентификација није успела.'; 10 | $PHPMAILER_LANG['connect_host'] = 'SMTP грешка: повезивање са SMTP сервером није успело.'; 11 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP грешка: подаци нису прихваћени.'; 12 | $PHPMAILER_LANG['empty_message'] = 'Садржај поруке је празан.'; 13 | $PHPMAILER_LANG['encoding'] = 'Непознато кодирање: '; 14 | $PHPMAILER_LANG['execute'] = 'Није могуће извршити наредбу: '; 15 | $PHPMAILER_LANG['file_access'] = 'Није могуће приступити датотеци: '; 16 | $PHPMAILER_LANG['file_open'] = 'Није могуће отворити датотеку: '; 17 | $PHPMAILER_LANG['from_failed'] = 'SMTP грешка: слање са следећих адреса није успело: '; 18 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP грешка: слање на следеће адресе није успело: '; 19 | $PHPMAILER_LANG['instantiate'] = 'Није могуће покренути mail функцију.'; 20 | $PHPMAILER_LANG['invalid_address'] = 'Порука није послата. Неисправна адреса: '; 21 | $PHPMAILER_LANG['mailer_not_supported'] = ' мејлер није подржан.'; 22 | $PHPMAILER_LANG['provide_address'] = 'Дефинишите бар једну адресу примаоца.'; 23 | $PHPMAILER_LANG['signing'] = 'Грешка приликом пријаве: '; 24 | $PHPMAILER_LANG['smtp_connect_failed'] = 'Повезивање са SMTP сервером није успело.'; 25 | $PHPMAILER_LANG['smtp_error'] = 'Грешка SMTP сервера: '; 26 | $PHPMAILER_LANG['variable_set'] = 'Није могуће задати нити ресетовати променљиву: '; 27 | $PHPMAILER_LANG['extension_missing'] = 'Недостаје проширење: '; 28 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-mg.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | $PHPMAILER_LANG['authenticate'] = 'Hadisoana SMTP: Tsy nahomby ny fanamarinana.'; 8 | $PHPMAILER_LANG['connect_host'] = 'SMTP Error: Tsy afaka mampifandray amin\'ny mpampiantrano SMTP.'; 9 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP diso: tsy voarakitra ny angona.'; 10 | $PHPMAILER_LANG['empty_message'] = 'Tsy misy ny votoaty mailaka.'; 11 | $PHPMAILER_LANG['encoding'] = 'Tsy fantatra encoding: '; 12 | $PHPMAILER_LANG['execute'] = 'Tsy afaka manatanteraka ity baiko manaraka ity: '; 13 | $PHPMAILER_LANG['file_access'] = 'Tsy nahomby ny fidirana amin\'ity rakitra ity: '; 14 | $PHPMAILER_LANG['file_open'] = 'Hadisoana diso: Tsy afaka nanokatra ity file manaraka ity: '; 15 | $PHPMAILER_LANG['from_failed'] = 'Ny adiresy iraka manaraka dia diso: '; 16 | $PHPMAILER_LANG['instantiate'] = 'Tsy afaka nanomboka ny hetsika mail.'; 17 | $PHPMAILER_LANG['invalid_address'] = 'Tsy mety ny adiresy: '; 18 | $PHPMAILER_LANG['mailer_not_supported'] = ' mailer tsy manohana.'; 19 | $PHPMAILER_LANG['provide_address'] = 'Alefaso azafady iray adiresy iray farafahakeliny.'; 20 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: Tsy mety ireo mpanaraka ireto: '; 21 | $PHPMAILER_LANG['signing'] = 'Error nandritra ny sonia:'; 22 | $PHPMAILER_LANG['smtp_connect_failed'] = 'Tsy nahomby ny fifandraisana tamin\'ny server SMTP.'; 23 | $PHPMAILER_LANG['smtp_error'] = 'Fahadisoana tamin\'ny server SMTP: '; 24 | $PHPMAILER_LANG['variable_set'] = 'Tsy azo atao ny mametraka na mamerina ny variable: '; 25 | $PHPMAILER_LANG['extension_missing'] = 'Tsy hita ny ampahany: '; 26 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-id.php: -------------------------------------------------------------------------------- 1 | 6 | * @author @januridp 7 | */ 8 | 9 | $PHPMAILER_LANG['authenticate'] = 'Kesalahan SMTP: Tidak dapat mengotentikasi.'; 10 | $PHPMAILER_LANG['connect_host'] = 'Kesalahan SMTP: Tidak dapat terhubung ke host SMTP.'; 11 | $PHPMAILER_LANG['data_not_accepted'] = 'Kesalahan SMTP: Data tidak diterima.'; 12 | $PHPMAILER_LANG['empty_message'] = 'Isi pesan kosong'; 13 | $PHPMAILER_LANG['encoding'] = 'Pengkodean karakter tidak dikenali: '; 14 | $PHPMAILER_LANG['execute'] = 'Tidak dapat menjalankan proses : '; 15 | $PHPMAILER_LANG['file_access'] = 'Tidak dapat mengakses berkas : '; 16 | $PHPMAILER_LANG['file_open'] = 'Kesalahan File: Berkas tidak dapat dibuka : '; 17 | $PHPMAILER_LANG['from_failed'] = 'Alamat pengirim berikut mengakibatkan kesalahan : '; 18 | $PHPMAILER_LANG['instantiate'] = 'Tidak dapat menginisialisasi fungsi surel'; 19 | $PHPMAILER_LANG['invalid_address'] = 'Gagal terkirim, alamat surel tidak benar : '; 20 | $PHPMAILER_LANG['provide_address'] = 'Harus disediakan minimal satu alamat tujuan'; 21 | $PHPMAILER_LANG['mailer_not_supported'] = ' mailer tidak didukung'; 22 | $PHPMAILER_LANG['recipients_failed'] = 'Kesalahan SMTP: Alamat tujuan berikut menghasilkan kesalahan : '; 23 | $PHPMAILER_LANG['signing'] = 'Kesalahan dalam tanda tangan : '; 24 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() gagal.'; 25 | $PHPMAILER_LANG['smtp_error'] = 'Kesalahan pada pelayan SMTP : '; 26 | $PHPMAILER_LANG['variable_set'] = 'Tidak dapat mengatur atau mengatur ulang variable : '; 27 | $PHPMAILER_LANG['extension_missing'] = 'Ekstensi hilang: '; 28 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-it.php: -------------------------------------------------------------------------------- 1 | 6 | * @author Stefano Sabatini 7 | */ 8 | 9 | $PHPMAILER_LANG['authenticate'] = 'SMTP Error: Impossibile autenticarsi.'; 10 | $PHPMAILER_LANG['connect_host'] = 'SMTP Error: Impossibile connettersi all\'host SMTP.'; 11 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Dati non accettati dal server.'; 12 | $PHPMAILER_LANG['empty_message'] = 'Il corpo del messaggio è vuoto'; 13 | $PHPMAILER_LANG['encoding'] = 'Codifica dei caratteri sconosciuta: '; 14 | $PHPMAILER_LANG['execute'] = 'Impossibile eseguire l\'operazione: '; 15 | $PHPMAILER_LANG['file_access'] = 'Impossibile accedere al file: '; 16 | $PHPMAILER_LANG['file_open'] = 'File Error: Impossibile aprire il file: '; 17 | $PHPMAILER_LANG['from_failed'] = 'I seguenti indirizzi mittenti hanno generato errore: '; 18 | $PHPMAILER_LANG['instantiate'] = 'Impossibile istanziare la funzione mail'; 19 | $PHPMAILER_LANG['invalid_address'] = 'Impossibile inviare, l\'indirizzo email non è valido: '; 20 | $PHPMAILER_LANG['provide_address'] = 'Deve essere fornito almeno un indirizzo ricevente'; 21 | $PHPMAILER_LANG['mailer_not_supported'] = 'Mailer non supportato'; 22 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: I seguenti indirizzi destinatari hanno generato un errore: '; 23 | $PHPMAILER_LANG['signing'] = 'Errore nella firma: '; 24 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() fallita.'; 25 | $PHPMAILER_LANG['smtp_error'] = 'Errore del server SMTP: '; 26 | $PHPMAILER_LANG['variable_set'] = 'Impossibile impostare o resettare la variabile: '; 27 | $PHPMAILER_LANG['extension_missing'] = 'Estensione mancante: '; 28 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-pt.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'Erro do SMTP: Não foi possível realizar a autenticação.'; 9 | $PHPMAILER_LANG['connect_host'] = 'Erro do SMTP: Não foi possível realizar ligação com o servidor SMTP.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'Erro do SMTP: Os dados foram rejeitados.'; 11 | $PHPMAILER_LANG['empty_message'] = 'A mensagem no e-mail está vazia.'; 12 | $PHPMAILER_LANG['encoding'] = 'Codificação desconhecida: '; 13 | $PHPMAILER_LANG['execute'] = 'Não foi possível executar: '; 14 | $PHPMAILER_LANG['file_access'] = 'Não foi possível aceder o ficheiro: '; 15 | $PHPMAILER_LANG['file_open'] = 'Abertura do ficheiro: Não foi possível abrir o ficheiro: '; 16 | $PHPMAILER_LANG['from_failed'] = 'Ocorreram falhas nos endereços dos seguintes remententes: '; 17 | $PHPMAILER_LANG['instantiate'] = 'Não foi possível iniciar uma instância da função mail.'; 18 | $PHPMAILER_LANG['invalid_address'] = 'Não foi enviado nenhum e-mail para o endereço de e-mail inválido: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.'; 20 | $PHPMAILER_LANG['provide_address'] = 'Tem de fornecer pelo menos um endereço como destinatário do e-mail.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'Erro do SMTP: O endereço do seguinte destinatário falhou: '; 22 | $PHPMAILER_LANG['signing'] = 'Erro ao assinar: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falhou.'; 24 | $PHPMAILER_LANG['smtp_error'] = 'Erro de servidor SMTP: '; 25 | $PHPMAILER_LANG['variable_set'] = 'Não foi possível definir ou redefinir a variável: '; 26 | $PHPMAILER_LANG['extension_missing'] = 'Extensão em falta: '; 27 | -------------------------------------------------------------------------------- /email/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "phpmailer/phpmailer", 3 | "type": "library", 4 | "description": "PHPMailer is a full-featured email creation and transfer class for PHP", 5 | "authors": [ 6 | { 7 | "name": "Marcus Bointon", 8 | "email": "phpmailer@synchromedia.co.uk" 9 | }, 10 | { 11 | "name": "Jim Jagielski", 12 | "email": "jimjag@gmail.com" 13 | }, 14 | { 15 | "name": "Andy Prevost", 16 | "email": "codeworxtech@users.sourceforge.net" 17 | }, 18 | { 19 | "name": "Brent R. Matzelle" 20 | } 21 | ], 22 | "require": { 23 | "php": ">=5.5.0", 24 | "ext-ctype": "*", 25 | "ext-filter": "*" 26 | }, 27 | "require-dev": { 28 | "friendsofphp/php-cs-fixer": "^2.2", 29 | "phpdocumentor/phpdocumentor": "2.*", 30 | "phpunit/phpunit": "^4.8 || ^5.7", 31 | "zendframework/zend-serializer": "2.7.*", 32 | "doctrine/annotations": "1.2.*", 33 | "zendframework/zend-eventmanager": "3.0.*", 34 | "zendframework/zend-i18n": "2.7.3" 35 | }, 36 | "suggest": { 37 | "psr/log": "For optional PSR-3 debug logging", 38 | "league/oauth2-google": "Needed for Google XOAUTH2 authentication", 39 | "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", 40 | "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", 41 | "ext-mbstring": "Needed to send email in multibyte encoding charset", 42 | "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" 43 | }, 44 | "autoload": { 45 | "psr-4": { 46 | "PHPMailer\\PHPMailer\\": "src/" 47 | } 48 | }, 49 | "autoload-dev": { 50 | "psr-4": { 51 | "PHPMailer\\Test\\": "test/" 52 | } 53 | }, 54 | "license": "LGPL-2.1-only" 55 | } 56 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-pt_br.php: -------------------------------------------------------------------------------- 1 | 6 | * @author Lucas Guimarães 7 | * @author Phelipe Alves 8 | * @author Fabio Beneditto 9 | */ 10 | 11 | $PHPMAILER_LANG['authenticate'] = 'Erro de SMTP: Não foi possível autenticar.'; 12 | $PHPMAILER_LANG['connect_host'] = 'Erro de SMTP: Não foi possível conectar ao servidor SMTP.'; 13 | $PHPMAILER_LANG['data_not_accepted'] = 'Erro de SMTP: Dados rejeitados.'; 14 | $PHPMAILER_LANG['empty_message'] = 'Mensagem vazia'; 15 | $PHPMAILER_LANG['encoding'] = 'Codificação desconhecida: '; 16 | $PHPMAILER_LANG['execute'] = 'Não foi possível executar: '; 17 | $PHPMAILER_LANG['file_access'] = 'Não foi possível acessar o arquivo: '; 18 | $PHPMAILER_LANG['file_open'] = 'Erro de Arquivo: Não foi possível abrir o arquivo: '; 19 | $PHPMAILER_LANG['from_failed'] = 'Os seguintes remetentes falharam: '; 20 | $PHPMAILER_LANG['instantiate'] = 'Não foi possível instanciar a função mail.'; 21 | $PHPMAILER_LANG['invalid_address'] = 'Endereço de e-mail inválido: '; 22 | $PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.'; 23 | $PHPMAILER_LANG['provide_address'] = 'Você deve informar pelo menos um destinatário.'; 24 | $PHPMAILER_LANG['recipients_failed'] = 'Erro de SMTP: Os seguintes destinatários falharam: '; 25 | $PHPMAILER_LANG['signing'] = 'Erro de Assinatura: '; 26 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falhou.'; 27 | $PHPMAILER_LANG['smtp_error'] = 'Erro de servidor SMTP: '; 28 | $PHPMAILER_LANG['variable_set'] = 'Não foi possível definir ou redefinir a variável: '; 29 | $PHPMAILER_LANG['extension_missing'] = 'Extensão não existe: '; 30 | -------------------------------------------------------------------------------- /email/language/phpmailer.lang-fr.php: -------------------------------------------------------------------------------- 1 | 4 | License 5 | 6 | GitHub stars 7 | 8 | GitHub forks 9 | 10 | ## 简介 11 | > 给未来写封信
12 | > 多年之后,愿你不负所期.
13 | > 时间没有现在,永恒没有未来,也没有过去
14 | > 未来的你,过的还好吗?
15 | > 给未来写封信,从过去获得惊喜,
16 | > 给未来的自己带来些鼓励的话, 
17 | > 或是写下一些目标,看未来的自己是否实现 18 | 19 | # 初衷 20 |   制作这个项目的初衷是为了让我们放下手边的一些事,或是给自己定下一个目标,或是仅仅只是一段对自己未来的憧憬。 21 | 22 | 在这个平台寄送出去,寄出的信是不可撤回的,也不可查找,希望你也忘掉这件事,直到你收到信的那一天,也给自己一个惊喜.在那一天回忆起写这封信的时候,带着更多的可能是一种怀念?或许这封邮件会激励你越走越远... 23 | 24 | # 用户/隐私协议 25 | 1. TimeMail-时光邮局,包括但不限于TimeMail,时光邮局等(特指定本程序)由XCSOFT开发,版权归xcsoft所有. 26 | 27 | 2. 源码使用到了MDUI作为前端样式,后端采用php,发信采用PHPMailer库. 在使用本程序时,应同时遵守以上源码的开源协议. 28 | 29 | 3. 由于某些不可抗因素,故开源本源码,由于时间限制,并没有做网页端的安装程序,所以需要用户手动修改根目录下的`config.php`,具体步骤会在下方快速开始栏目显示. 30 | 31 | 4. 在使用过程中,请不要修改版权信息,当然如果你实在要去改的话,我也拦不住\^_^) 32 | 33 | 5. 基于Apache2.0开源协议开源,使用过程中涉及到的一切可能造成损失的因素,由运营者承担,与本人无关. 34 | 35 | 6. 请不要使用与官方运营名称相类似的标题, 如 “拾光邮局” 等标识, 否则我们将采取相应措施, 包括但不限于在 本仓库标识, 官网展示等. 36 | 37 | 7. 禁止以任何手段倒卖本程序. 38 | 39 | 8. 协议可能随时更新,不另作通知. 40 | 41 | # 快速开始 42 | 1.修改根目录下的`config.php`文件,将DATABASE常量依据注释中的提示指向数据库地址,并导入根目录下的`time.sql`文件. 43 | 44 | 2.修改其他基本信息,注意网址必须区分https与http,否则可能导致邮件无法发送,在修改smtp信息的同时请注意填写正确,区分好授权码和密码. 45 | 46 | 3.将常量`IF_SET`修改为`true`,用于标识已经修改config信息. 47 | 48 | 4.至此,已经安装完毕,请注意如果任然无法发送邮件,可能是服务商屏蔽了25等常用smtp端口,请尝试与服务商取得联系得到支持,同时也注意服务器是否放通了该类端口,或者查看是否是WAF(Nginx防火墙)屏蔽了海外访问等常见问题. 49 | 50 | 5.最后记通过 Corntab 或 Uptime 等其他方式添加一个计划任务,定时访问 http//example.com/server/send.php 一天 > 2次 用于监控定时发信 51 | 52 | # 需要注意 53 | 54 | > TIPS: 由于仍然使用 mysqli 连接数据库, 未对语句进行预处理, 确定存在注入安全问题。 请务必搭配 WAF 使用,以避免隐私泄漏及潜在的安全风险。 55 | 56 | 如果搭建该平台,希望您能遵守约定,将所有信件按时寄出。 57 | 58 | 目前 www.timeletters.cn 为我们运行的官方站点, 并在持续升级构建中. (该版本并不会开源) 59 | -------------------------------------------------------------------------------- /check.php: -------------------------------------------------------------------------------- 1 | 3600){ 13 | mysqli_query($conn,"DELETE FROM `check` WHERE `uid`='$uid';"); 14 | mysqli_query($conn,"DELETE FROM `checking` WHERE `uid`='$uid';"); 15 | $info = "该链接已失效!"; 16 | }else{ 17 | $result = mysqli_fetch_assoc(mysqli_query($conn,"SELECT * FROM `checking` WHERE `uid`='$uid'")); 18 | $topic = $result['topic']; 19 | $content = $result['content']; 20 | $email = $result['email']; 21 | $timenow = $result['from']; 22 | $time = $result['to']; 23 | $ip = $result['ip']; 24 | //获取基本信息 25 | 26 | mysqli_query($conn,"DELETE FROM `check` WHERE `uid`='$uid';"); 27 | mysqli_query($conn,"DELETE FROM `checking` WHERE `uid`='$uid';"); 28 | mysqli_query($conn,"INSERT INTO `waiting` VALUES('$uid','$topic','$content','$email','$timenow','$time','$ip')"); 29 | 30 | $info = "恭喜你,验证成功!"; 31 | header("Refresh:10;url=\"./index.php\""); 32 | } 33 | ?> 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | <?php echo TITLE;?> 43 | 44 | 45 | 46 |
47 |
48 |
49 |
50 | 52 |
53 |
54 |
邮件确认
55 |
Corfirm State
56 |
57 |
58 |
59 |

60 |
61 |
62 |
63 |
64 |
65 | 66 | 67 | -------------------------------------------------------------------------------- /submit.php: -------------------------------------------------------------------------------- 1 | 5000) { 18 | echo "您发送的邮件内容超过了长度限制!"; 19 | exit(); 20 | } 21 | if (strlen($topic) > 500) { 22 | echo "您发送的邮件标题超过了长度限制!"; 23 | exit(); 24 | } 25 | if(!is_email($email)) 26 | { 27 | echo "请检查是否输入了真实的邮箱"; 28 | exit(); 29 | } 30 | if(strlen($content) < 20) 31 | { 32 | echo "信件内容太少了,再写点内容吧!"; 33 | exit(); 34 | } 35 | 36 | if (!empty($ip)) { 37 | $sql = "SELECT * FROM `checking` where ip = '$ip'"; 38 | $commd = mysqli_query($conn,$sql); 39 | $result_checking = mysqli_fetch_assoc($commd); 40 | 41 | $sql = "SELECT * FROM `checking` where ip = '$ip'"; 42 | $commd = mysqli_query($conn,$sql); 43 | $result_waiting = mysqli_fetch_assoc($commd); 44 | 45 | if (!empty($result_checking) || !empty($result_waiting)) { 46 | if (($time - $result_checking['time']) <= 3600*24 || ($time - $result_waiting['time']) <= 3600*24) { 47 | echo "每24小时只能投递一次哦!"; 48 | exit(); 49 | } 50 | } 51 | } 52 | 53 | $time = strtotime($time); 54 | $timenow = strtotime(date("Y-m-d H:i:s",time())); 55 | $timereal = time(); 56 | //timenow->发信时间戳 time->收信时间戳 timereal->完整时间戳 57 | 58 | if($time <= $timenow) 59 | { 60 | echo "请填写一个将来的时间!"; 61 | exit(); 62 | } 63 | 64 | //判断收信时间与当前时间先后 65 | $code = null; 66 | $str = "17hj0q5rtyzxcv89bn34o6sdfguiwepa2klm"; 67 | $max = strlen($str)-1; 68 | for ($i = 0;$i < 50; $i++) { 69 | $code.= $str[rand(0,$max)]; 70 | } 71 | $urll = URL . "check.php?c=$code"; 72 | $html = " 73 |

欢迎使用TimeMail - 时光邮局

74 |   我们发送这封验证邮件以防止他人滥用时光邮局,接下来请点击立即激活来激活您的邮箱,链接1小时内有效。
75 |   如果您无法点击,请直接访问:$urll

76 |   接下来请你删除这封验证邮件,忘掉这件事,未来是光明而美丽的,爱它吧,向它突进,为它工作,迎接它,尽可能地使它成为现实吧,期待未来这封信与你再次相遇的时,您已完成自己心中定下的目标!
77 |   为了在未来能收到这封信,请将".EMAIL_SET['email']."添加到邮箱白名单

78 |   若您并没有在TimeMail发送过邮件,请忽略这封邮件,很抱歉对您的打扰. 79 | "; 80 | $return = emailsend($email,"TimeMail邮箱验证",$html); 81 | $sql1 = "INSERT INTO `check` VALUES(uuid(),'$code','$timereal')"; 82 | mysqli_query($conn,$sql1); 83 | 84 | $selectuid = "select * from `check` where `code`='$code';"; 85 | $re = mysqli_query($conn,$selectuid); 86 | $arr = mysqli_fetch_assoc($re); 87 | $uid = $arr['uid']; 88 | //获取uid,防止uid不同 89 | if($result = 200){ 90 | $sql = "INSERT INTO `checking` VALUES('$uid','$topic','$content','$email','$timenow','$time','$ip')"; 91 | mysqli_query($conn,$sql); 92 | echo 200; 93 | }else{ 94 | echo("错误代码:emailapi error,请联系网站管理员处理!"); 95 | exit(); 96 | } 97 | ?> -------------------------------------------------------------------------------- /write.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |

写信

5 |
6 | 7 |
8 |
9 | " class="mdui-textfield-input" type="text" /> 10 |
11 |
12 | 13 |
14 |
15 | 16 |
17 |
18 | 20 |
21 |
22 | 23 |
24 |
25 |
注意事项:
26 |

27 | 寄出的信是不可撤回的,也不可查找,希望你也忘掉这件事,直到你收到信的那一天。
28 | 同时在投递的那一刻我们将向你的邮箱发送一封确认邮件,只有点击确认邮件中的链接,您才能在未来收到邮件.
29 | 请记得将service#xcsoft.top加入邮箱白名单,以防收不到信
30 | 更多请访问菜单栏中的关于页面 31 |

32 |
33 |
34 | 35 | 36 | 37 | 38 | 84 |
85 | 86 | -------------------------------------------------------------------------------- /email/emailsend.php: -------------------------------------------------------------------------------- 1 | '401' 46 | ); 47 | $data_json = json_encode($data); 48 | header('Content-type:text/json'); 49 | echo $data_json; 50 | exit(); 51 | } 52 | $mail = new PHPMailer(true); // Passing `true` enables exceptions 53 | try { 54 | //服务器配置 55 | $mail->CharSet ="UTF-8"; //设定邮件编码 56 | $mail->SMTPDebug = 0; // 调试模式输出 57 | $mail->isSMTP(); // 使用SMTP 58 | $mail->Host = EMAIL_SET['smtp']; // SMTP服务器 59 | $mail->SMTPAuth = true; // 允许 SMTP 认证 60 | $mail->Username = EMAIL_SET['email']; // SMTP 用户名 即邮箱的用户名 61 | $mail->Password = EMAIL_SET['passwd']; // SMTP 密码 部分邮箱是授权码(例如163邮箱) 62 | $mail->SMTPSecure = EMAIL_SET['Secure']; // 允许 TLS 或者ssl协议 63 | $mail->Port = EMAIL_SET['port']; // 服务器端口 25 或者465 具体要看邮箱服务器支持 64 | $mail->setFrom(EMAIL_SET['setFrom'],$name); //发件人 65 | $mail->addAddress($sendto); // 收件人 66 | //$mail->addAddress('ellen@example.com'); // 可添加多个收件人 67 | $mail->addReplyTo($sendto); //回复的时候回复给哪个邮箱 建议和发件人一致 68 | //$mail->addCC('cc@example.com'); //抄送 69 | //$mail->addBCC('bcc@example.com'); //密送 70 | 71 | //发送附件 72 | // $mail->addAttachment('../xy.zip'); // 添加附件 73 | // $mail->addAttachment('../thumb-1.jpg', 'new.jpg'); // 发送附件并且重命名 74 | 75 | //Content 76 | $mail->isHTML(true); // 是否以HTML文档格式发送 发送后客户端可直接显示对应HTML内容 77 | $mail->Subject = $topic; 78 | $mail->Body = $content; 79 | $mail->send(); 80 | header('Content-type:text/json'); 81 | echo json_encode(["code" => "200", "msg" => "success"]); 82 | } catch (Exception $e) { 83 | $data = [ 84 | 'code' => 'error' 85 | ]; 86 | if (DEBUG == true) $data["errMsg"] = $e->getMessage(); 87 | header('Content-type:text/json'); 88 | echo json_encode($data); 89 | } 90 | -------------------------------------------------------------------------------- /header.php: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | <?php echo TITLE ?> 19 | 20 | 21 | 22 | 30 | 31 | 32 |
33 | 34 |
35 | 36 | menu 37 | 38 | TimeMail 39 |
40 |
41 |
42 | 60 |
61 |
62 | 63 |  友链 64 | keyboard_arrow_down 65 |
66 |
67 | 星辰日记 68 |
69 |
70 |
71 |
72 |
73 | -------------------------------------------------------------------------------- /config.php: -------------------------------------------------------------------------------- 1 | 'rand', //随机值 15 | 'smtp' => 'smtp.exmail.qq.com', //SMTP 用户名 即邮箱的用户名 16 | 'email' => 'service@example.com', //邮箱账户 17 | 'passwd' => 'PASSWD', //SMTP 密码 部分邮箱是授权码(例如163邮箱) 18 | 'Secure' => 'ssl', 19 | 'setFrom' => 'service@example.com', //发件人 20 | 'port' => '465', //服务器端口 25 或者465 具体要看邮箱服务器支持 21 | 'name' => 'TimeMail - 时光邮局' //发信名称 22 | )); 23 | //邮箱配置 24 | 25 | define('IF_SET',false); 26 | //用于判断是否手动修改配置,请再修改过后将此处的false改为true 如 替换为define('IF_SET',true); 27 | 28 | /*********************************** 29 | * * 30 | * 以下配置不需要修改 * 31 | * * 32 | ***********************************/ 33 | $conn = mysqli_connect(DATABASE[0],DATABASE[1],DATABASE[2],DATABASE[3]); 34 | $conns = mysqli_connect(DATABASE[0],DATABASE[1],DATABASE[2],"information_schema"); 35 | 36 | 37 | define("EMAILAPI", URL . "email/emailsend.php"); 38 | 39 | /* 40 | function 41 | */ 42 | if ($HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"]) 43 | { 44 | $ip = $HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"]; 45 | } 46 | elseif ($HTTP_SERVER_VARS["HTTP_CLIENT_IP"]) 47 | { 48 | $ip = $HTTP_SERVER_VARS["HTTP_CLIENT_IP"]; 49 | } 50 | elseif ($HTTP_SERVER_VARS["REMOTE_ADDR"]) 51 | { 52 | $ip = $HTTP_SERVER_VARS["REMOTE_ADDR"]; 53 | } 54 | elseif (getenv("HTTP_X_FORWARDED_FOR")) 55 | { 56 | $ip = getenv("HTTP_X_FORWARDED_FOR"); 57 | } 58 | elseif (getenv("HTTP_CLIENT_IP")) 59 | { 60 | $ip = getenv("HTTP_CLIENT_IP"); 61 | } 62 | elseif (getenv("REMOTE_ADDR")) 63 | { 64 | $ip = getenv("REMOTE_ADDR"); 65 | } 66 | else 67 | { 68 | $ip = "Unknown"; 69 | } 70 | //获取用户ip 71 | 72 | function is_email($user_email) 73 | { 74 | $chars = "/^([a-z0-9+_]|\\-|\\.)+@(([a-z0-9_]|\\-)+\\.)+[a-z]{2,6}\$/i"; 75 | if (strpos($user_email, '@') !== false && strpos($user_email, '.') !== false) 76 | { 77 | if (preg_match($chars, $user_email)){ 78 | return true; 79 | } 80 | else{ 81 | return false; 82 | } 83 | } 84 | else{ 85 | return false; 86 | } 87 | } 88 | //邮箱合法性 89 | 90 | $ban = array( 91 | "1.1.1.2" => "ban" 92 | ); 93 | //ban用户数据库 94 | 95 | function emailsend($sendto,$topic,$content) { 96 | $data = array ( 97 | 'key' => EMAIL_SET['key'], 98 | 'sendto' => $sendto, 99 | 'topic' => $topic, 100 | 'content' => $content, 101 | 'name' => EMAIL_SET['name'] 102 | ); 103 | $ch = curl_init (); 104 | curl_setopt ($ch, CURLOPT_URL, EMAILAPI); 105 | curl_setopt ($ch, CURLOPT_POST, 1); 106 | curl_setopt ($ch, CURLOPT_HEADER, 0); 107 | curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); 108 | curl_setopt ($ch, CURLOPT_POSTFIELDS, $data); 109 | $return = curl_exec ($ch); 110 | curl_close ($ch); 111 | $arr = json_decode($return, true); 112 | //获取返回值 113 | return $arr; 114 | } 115 | //邮件发送 116 | 117 | 118 | ?> 119 | -------------------------------------------------------------------------------- /email/src/OAuth.php: -------------------------------------------------------------------------------- 1 | 9 | * @author Jim Jagielski (jimjag) 10 | * @author Andy Prevost (codeworxtech) 11 | * @author Brent R. Matzelle (original founder) 12 | * @copyright 2012 - 2015 Marcus Bointon 13 | * @copyright 2010 - 2012 Jim Jagielski 14 | * @copyright 2004 - 2009 Andy Prevost 15 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 16 | * @note This program is distributed in the hope that it will be useful - WITHOUT 17 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 18 | * FITNESS FOR A PARTICULAR PURPOSE. 19 | */ 20 | 21 | namespace PHPMailer\PHPMailer; 22 | 23 | use League\OAuth2\Client\Grant\RefreshToken; 24 | use League\OAuth2\Client\Provider\AbstractProvider; 25 | use League\OAuth2\Client\Token\AccessToken; 26 | 27 | /** 28 | * OAuth - OAuth2 authentication wrapper class. 29 | * Uses the oauth2-client package from the League of Extraordinary Packages. 30 | * 31 | * @see http://oauth2-client.thephpleague.com 32 | * 33 | * @author Marcus Bointon (Synchro/coolbru) 34 | */ 35 | class OAuth 36 | { 37 | /** 38 | * An instance of the League OAuth Client Provider. 39 | * 40 | * @var AbstractProvider 41 | */ 42 | protected $provider; 43 | 44 | /** 45 | * The current OAuth access token. 46 | * 47 | * @var AccessToken 48 | */ 49 | protected $oauthToken; 50 | 51 | /** 52 | * The user's email address, usually used as the login ID 53 | * and also the from address when sending email. 54 | * 55 | * @var string 56 | */ 57 | protected $oauthUserEmail = ''; 58 | 59 | /** 60 | * The client secret, generated in the app definition of the service you're connecting to. 61 | * 62 | * @var string 63 | */ 64 | protected $oauthClientSecret = ''; 65 | 66 | /** 67 | * The client ID, generated in the app definition of the service you're connecting to. 68 | * 69 | * @var string 70 | */ 71 | protected $oauthClientId = ''; 72 | 73 | /** 74 | * The refresh token, used to obtain new AccessTokens. 75 | * 76 | * @var string 77 | */ 78 | protected $oauthRefreshToken = ''; 79 | 80 | /** 81 | * OAuth constructor. 82 | * 83 | * @param array $options Associative array containing 84 | * `provider`, `userName`, `clientSecret`, `clientId` and `refreshToken` elements 85 | */ 86 | public function __construct($options) 87 | { 88 | $this->provider = $options['provider']; 89 | $this->oauthUserEmail = $options['userName']; 90 | $this->oauthClientSecret = $options['clientSecret']; 91 | $this->oauthClientId = $options['clientId']; 92 | $this->oauthRefreshToken = $options['refreshToken']; 93 | } 94 | 95 | /** 96 | * Get a new RefreshToken. 97 | * 98 | * @return RefreshToken 99 | */ 100 | protected function getGrant() 101 | { 102 | return new RefreshToken(); 103 | } 104 | 105 | /** 106 | * Get a new AccessToken. 107 | * 108 | * @return AccessToken 109 | */ 110 | protected function getToken() 111 | { 112 | return $this->provider->getAccessToken( 113 | $this->getGrant(), 114 | ['refresh_token' => $this->oauthRefreshToken] 115 | ); 116 | } 117 | 118 | /** 119 | * Generate a base64-encoded OAuth token. 120 | * 121 | * @return string 122 | */ 123 | public function getOauth64() 124 | { 125 | // Get a new token if it's not available or has expired 126 | if (null === $this->oauthToken or $this->oauthToken->hasExpired()) { 127 | $this->oauthToken = $this->getToken(); 128 | } 129 | 130 | return base64_encode( 131 | 'user=' . 132 | $this->oauthUserEmail . 133 | "\001auth=Bearer " . 134 | $this->oauthToken . 135 | "\001\001" 136 | ); 137 | } 138 | } 139 | -------------------------------------------------------------------------------- /email/get_oauth_token.php: -------------------------------------------------------------------------------- 1 | 8 | * @author Jim Jagielski (jimjag) 9 | * @author Andy Prevost (codeworxtech) 10 | * @author Brent R. Matzelle (original founder) 11 | * @copyright 2012 - 2017 Marcus Bointon 12 | * @copyright 2010 - 2012 Jim Jagielski 13 | * @copyright 2004 - 2009 Andy Prevost 14 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 15 | * @note This program is distributed in the hope that it will be useful - WITHOUT 16 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17 | * FITNESS FOR A PARTICULAR PURPOSE. 18 | */ 19 | /** 20 | * Get an OAuth2 token from an OAuth2 provider. 21 | * * Install this script on your server so that it's accessible 22 | * as [https/http]:////get_oauth_token.php 23 | * e.g.: http://localhost/phpmailer/get_oauth_token.php 24 | * * Ensure dependencies are installed with 'composer install' 25 | * * Set up an app in your Google/Yahoo/Microsoft account 26 | * * Set the script address as the app's redirect URL 27 | * If no refresh token is obtained when running this file, 28 | * revoke access to your app and run the script again. 29 | */ 30 | 31 | namespace PHPMailer\PHPMailer; 32 | 33 | /** 34 | * Aliases for League Provider Classes 35 | * Make sure you have added these to your composer.json and run `composer install` 36 | * Plenty to choose from here: 37 | * @see http://oauth2-client.thephpleague.com/providers/thirdparty/ 38 | */ 39 | // @see https://github.com/thephpleague/oauth2-google 40 | use League\OAuth2\Client\Provider\Google; 41 | // @see https://packagist.org/packages/hayageek/oauth2-yahoo 42 | use Hayageek\OAuth2\Client\Provider\Yahoo; 43 | // @see https://github.com/stevenmaguire/oauth2-microsoft 44 | use Stevenmaguire\OAuth2\Client\Provider\Microsoft; 45 | 46 | if (!isset($_GET['code']) && !isset($_GET['provider'])) { 47 | ?> 48 | 49 | Select Provider:
50 | Google
51 | Yahoo
52 | Microsoft/Outlook/Hotmail/Live/Office365
53 | 54 | 55 | $clientId, 86 | 'clientSecret' => $clientSecret, 87 | 'redirectUri' => $redirectUri, 88 | 'accessType' => 'offline' 89 | ]; 90 | 91 | $options = []; 92 | $provider = null; 93 | 94 | switch ($providerName) { 95 | case 'Google': 96 | $provider = new Google($params); 97 | $options = [ 98 | 'scope' => [ 99 | 'https://mail.google.com/' 100 | ] 101 | ]; 102 | break; 103 | case 'Yahoo': 104 | $provider = new Yahoo($params); 105 | break; 106 | case 'Microsoft': 107 | $provider = new Microsoft($params); 108 | $options = [ 109 | 'scope' => [ 110 | 'wl.imap', 111 | 'wl.offline_access' 112 | ] 113 | ]; 114 | break; 115 | } 116 | 117 | if (null === $provider) { 118 | exit('Provider missing'); 119 | } 120 | 121 | if (!isset($_GET['code'])) { 122 | // If we don't have an authorization code then get one 123 | $authUrl = $provider->getAuthorizationUrl($options); 124 | $_SESSION['oauth2state'] = $provider->getState(); 125 | header('Location: ' . $authUrl); 126 | exit; 127 | // Check given state against previously stored one to mitigate CSRF attack 128 | } elseif (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['oauth2state'])) { 129 | unset($_SESSION['oauth2state']); 130 | unset($_SESSION['provider']); 131 | exit('Invalid state'); 132 | } else { 133 | unset($_SESSION['provider']); 134 | // Try to get an access token (using the authorization code grant) 135 | $token = $provider->getAccessToken( 136 | 'authorization_code', 137 | [ 138 | 'code' => $_GET['code'] 139 | ] 140 | ); 141 | // Use this to interact with an API on the users behalf 142 | // Use this to get a new access token if the old one expires 143 | echo 'Refresh Token: ', $token->getRefreshToken(); 144 | } 145 | -------------------------------------------------------------------------------- /welcome.php: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 欢迎使用 - TimeMail - 时光邮局 18 | 19 | 20 | 21 | 22 | 69 | 70 | 71 | 72 |
73 | 74 |
75 |
TimeMail
76 |
77 |
78 |
79 | 86 |
87 |
88 |
89 |

使用条款/隐私协议 ->

90 |

1.TimeMail-时光邮局,包括但不限于TimeMail,时光邮局等(特指定本程序)由XCSOFT开发,版权归xcsoft所有.

91 |

2.源码使用到了MDUI作为前端样式,后端采用php,发信采用PHPMailer库.在使用本程序时,应同时遵守以上源码的开源协议.

92 |

3.由于某些不可抗因素,故开源本源码,由于时间限制,并没有做网页端的安装程序,所以需要用户手动修改根目录下的`config.php`,具体步骤会在下方快速开始栏目显示.

93 |

4.在使用过程中,请不要修改版权信息,当然如果你实在要去改的话,我也拦不住对不对\^_^)

94 |

5.基于Apache2.0开源协议开源,使用过程中涉及到的一切可能造成损失的因素,由运营者承担,与本人无关.

95 |

6.禁止倒卖本程序.

96 |

7.协议可能随时更新,不另作通知.

97 |

快速开始 ->

98 |

1.修改根目录下的`config.php`文件,将DATABASE常量依据注释中的提示指向数据库地址,并导入根目录下的`time.sql`文件.

99 |

2.修改其他基本信息,注意网址必须区分https与http,否则可能导致邮件无法发送,在修改smtp信息的同时请注意填写正确,区分好授权码和密码.

100 |

3.将常量`IF_SET`修改为`true`,用于标识已经修改config信息.

101 |

4.至此,已经安装完毕,请注意如果任然无法发送邮件,可能是服务商屏蔽了25等常用smtp端口,请尝试与服务商取得联系得到支持,同时也注意服务器是否放通了该类端口,或者查看是否是WAF(Nginx防火墙)屏蔽了海外访问等常见问题.

102 |

5.有任何问题,请尝试通过contact@xcsoft.topBLOG获取帮助.

103 |
104 |
105 |
106 | 107 |
108 |
109 | 110 | CopyRight. © 2018-2020 XCSOFT Copyright. 111 |
112 | 113 |
114 | 115 | 116 | 117 | 120 | 121 | 122 | 123 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /email/src/POP3.php: -------------------------------------------------------------------------------- 1 | 9 | * @author Jim Jagielski (jimjag) 10 | * @author Andy Prevost (codeworxtech) 11 | * @author Brent R. Matzelle (original founder) 12 | * @copyright 2012 - 2017 Marcus Bointon 13 | * @copyright 2010 - 2012 Jim Jagielski 14 | * @copyright 2004 - 2009 Andy Prevost 15 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 16 | * @note This program is distributed in the hope that it will be useful - WITHOUT 17 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 18 | * FITNESS FOR A PARTICULAR PURPOSE. 19 | */ 20 | 21 | namespace PHPMailer\PHPMailer; 22 | 23 | /** 24 | * PHPMailer POP-Before-SMTP Authentication Class. 25 | * Specifically for PHPMailer to use for RFC1939 POP-before-SMTP authentication. 26 | * 1) This class does not support APOP authentication. 27 | * 2) Opening and closing lots of POP3 connections can be quite slow. If you need 28 | * to send a batch of emails then just perform the authentication once at the start, 29 | * and then loop through your mail sending script. Providing this process doesn't 30 | * take longer than the verification period lasts on your POP3 server, you should be fine. 31 | * 3) This is really ancient technology; you should only need to use it to talk to very old systems. 32 | * 4) This POP3 class is deliberately lightweight and incomplete, and implements just 33 | * enough to do authentication. 34 | * If you want a more complete class there are other POP3 classes for PHP available. 35 | * 36 | * @author Richard Davey (original author) 37 | * @author Marcus Bointon (Synchro/coolbru) 38 | * @author Jim Jagielski (jimjag) 39 | * @author Andy Prevost (codeworxtech) 40 | */ 41 | class POP3 42 | { 43 | /** 44 | * The POP3 PHPMailer Version number. 45 | * 46 | * @var string 47 | */ 48 | const VERSION = '6.0.7'; 49 | 50 | /** 51 | * Default POP3 port number. 52 | * 53 | * @var int 54 | */ 55 | const DEFAULT_PORT = 110; 56 | 57 | /** 58 | * Default timeout in seconds. 59 | * 60 | * @var int 61 | */ 62 | const DEFAULT_TIMEOUT = 30; 63 | 64 | /** 65 | * Debug display level. 66 | * Options: 0 = no, 1+ = yes. 67 | * 68 | * @var int 69 | */ 70 | public $do_debug = 0; 71 | 72 | /** 73 | * POP3 mail server hostname. 74 | * 75 | * @var string 76 | */ 77 | public $host; 78 | 79 | /** 80 | * POP3 port number. 81 | * 82 | * @var int 83 | */ 84 | public $port; 85 | 86 | /** 87 | * POP3 Timeout Value in seconds. 88 | * 89 | * @var int 90 | */ 91 | public $tval; 92 | 93 | /** 94 | * POP3 username. 95 | * 96 | * @var string 97 | */ 98 | public $username; 99 | 100 | /** 101 | * POP3 password. 102 | * 103 | * @var string 104 | */ 105 | public $password; 106 | 107 | /** 108 | * Resource handle for the POP3 connection socket. 109 | * 110 | * @var resource 111 | */ 112 | protected $pop_conn; 113 | 114 | /** 115 | * Are we connected? 116 | * 117 | * @var bool 118 | */ 119 | protected $connected = false; 120 | 121 | /** 122 | * Error container. 123 | * 124 | * @var array 125 | */ 126 | protected $errors = []; 127 | 128 | /** 129 | * Line break constant. 130 | */ 131 | const LE = "\r\n"; 132 | 133 | /** 134 | * Simple static wrapper for all-in-one POP before SMTP. 135 | * 136 | * @param string $host The hostname to connect to 137 | * @param int|bool $port The port number to connect to 138 | * @param int|bool $timeout The timeout value 139 | * @param string $username 140 | * @param string $password 141 | * @param int $debug_level 142 | * 143 | * @return bool 144 | */ 145 | public static function popBeforeSmtp( 146 | $host, 147 | $port = false, 148 | $timeout = false, 149 | $username = '', 150 | $password = '', 151 | $debug_level = 0 152 | ) { 153 | $pop = new self(); 154 | 155 | return $pop->authorise($host, $port, $timeout, $username, $password, $debug_level); 156 | } 157 | 158 | /** 159 | * Authenticate with a POP3 server. 160 | * A connect, login, disconnect sequence 161 | * appropriate for POP-before SMTP authorisation. 162 | * 163 | * @param string $host The hostname to connect to 164 | * @param int|bool $port The port number to connect to 165 | * @param int|bool $timeout The timeout value 166 | * @param string $username 167 | * @param string $password 168 | * @param int $debug_level 169 | * 170 | * @return bool 171 | */ 172 | public function authorise($host, $port = false, $timeout = false, $username = '', $password = '', $debug_level = 0) 173 | { 174 | $this->host = $host; 175 | // If no port value provided, use default 176 | if (false === $port) { 177 | $this->port = static::DEFAULT_PORT; 178 | } else { 179 | $this->port = (int) $port; 180 | } 181 | // If no timeout value provided, use default 182 | if (false === $timeout) { 183 | $this->tval = static::DEFAULT_TIMEOUT; 184 | } else { 185 | $this->tval = (int) $timeout; 186 | } 187 | $this->do_debug = $debug_level; 188 | $this->username = $username; 189 | $this->password = $password; 190 | // Reset the error log 191 | $this->errors = []; 192 | // connect 193 | $result = $this->connect($this->host, $this->port, $this->tval); 194 | if ($result) { 195 | $login_result = $this->login($this->username, $this->password); 196 | if ($login_result) { 197 | $this->disconnect(); 198 | 199 | return true; 200 | } 201 | } 202 | // We need to disconnect regardless of whether the login succeeded 203 | $this->disconnect(); 204 | 205 | return false; 206 | } 207 | 208 | /** 209 | * Connect to a POP3 server. 210 | * 211 | * @param string $host 212 | * @param int|bool $port 213 | * @param int $tval 214 | * 215 | * @return bool 216 | */ 217 | public function connect($host, $port = false, $tval = 30) 218 | { 219 | // Are we already connected? 220 | if ($this->connected) { 221 | return true; 222 | } 223 | 224 | //On Windows this will raise a PHP Warning error if the hostname doesn't exist. 225 | //Rather than suppress it with @fsockopen, capture it cleanly instead 226 | set_error_handler([$this, 'catchWarning']); 227 | 228 | if (false === $port) { 229 | $port = static::DEFAULT_PORT; 230 | } 231 | 232 | // connect to the POP3 server 233 | $this->pop_conn = fsockopen( 234 | $host, // POP3 Host 235 | $port, // Port # 236 | $errno, // Error Number 237 | $errstr, // Error Message 238 | $tval 239 | ); // Timeout (seconds) 240 | // Restore the error handler 241 | restore_error_handler(); 242 | 243 | // Did we connect? 244 | if (false === $this->pop_conn) { 245 | // It would appear not... 246 | $this->setError( 247 | "Failed to connect to server $host on port $port. errno: $errno; errstr: $errstr" 248 | ); 249 | 250 | return false; 251 | } 252 | 253 | // Increase the stream time-out 254 | stream_set_timeout($this->pop_conn, $tval, 0); 255 | 256 | // Get the POP3 server response 257 | $pop3_response = $this->getResponse(); 258 | // Check for the +OK 259 | if ($this->checkResponse($pop3_response)) { 260 | // The connection is established and the POP3 server is talking 261 | $this->connected = true; 262 | 263 | return true; 264 | } 265 | 266 | return false; 267 | } 268 | 269 | /** 270 | * Log in to the POP3 server. 271 | * Does not support APOP (RFC 2828, 4949). 272 | * 273 | * @param string $username 274 | * @param string $password 275 | * 276 | * @return bool 277 | */ 278 | public function login($username = '', $password = '') 279 | { 280 | if (!$this->connected) { 281 | $this->setError('Not connected to POP3 server'); 282 | } 283 | if (empty($username)) { 284 | $username = $this->username; 285 | } 286 | if (empty($password)) { 287 | $password = $this->password; 288 | } 289 | 290 | // Send the Username 291 | $this->sendString("USER $username" . static::LE); 292 | $pop3_response = $this->getResponse(); 293 | if ($this->checkResponse($pop3_response)) { 294 | // Send the Password 295 | $this->sendString("PASS $password" . static::LE); 296 | $pop3_response = $this->getResponse(); 297 | if ($this->checkResponse($pop3_response)) { 298 | return true; 299 | } 300 | } 301 | 302 | return false; 303 | } 304 | 305 | /** 306 | * Disconnect from the POP3 server. 307 | */ 308 | public function disconnect() 309 | { 310 | $this->sendString('QUIT'); 311 | //The QUIT command may cause the daemon to exit, which will kill our connection 312 | //So ignore errors here 313 | try { 314 | @fclose($this->pop_conn); 315 | } catch (Exception $e) { 316 | //Do nothing 317 | } 318 | } 319 | 320 | /** 321 | * Get a response from the POP3 server. 322 | * 323 | * @param int $size The maximum number of bytes to retrieve 324 | * 325 | * @return string 326 | */ 327 | protected function getResponse($size = 128) 328 | { 329 | $response = fgets($this->pop_conn, $size); 330 | if ($this->do_debug >= 1) { 331 | echo 'Server -> Client: ', $response; 332 | } 333 | 334 | return $response; 335 | } 336 | 337 | /** 338 | * Send raw data to the POP3 server. 339 | * 340 | * @param string $string 341 | * 342 | * @return int 343 | */ 344 | protected function sendString($string) 345 | { 346 | if ($this->pop_conn) { 347 | if ($this->do_debug >= 2) { //Show client messages when debug >= 2 348 | echo 'Client -> Server: ', $string; 349 | } 350 | 351 | return fwrite($this->pop_conn, $string, strlen($string)); 352 | } 353 | 354 | return 0; 355 | } 356 | 357 | /** 358 | * Checks the POP3 server response. 359 | * Looks for for +OK or -ERR. 360 | * 361 | * @param string $string 362 | * 363 | * @return bool 364 | */ 365 | protected function checkResponse($string) 366 | { 367 | if (substr($string, 0, 3) !== '+OK') { 368 | $this->setError("Server reported an error: $string"); 369 | 370 | return false; 371 | } 372 | 373 | return true; 374 | } 375 | 376 | /** 377 | * Add an error to the internal error store. 378 | * Also display debug output if it's enabled. 379 | * 380 | * @param string $error 381 | */ 382 | protected function setError($error) 383 | { 384 | $this->errors[] = $error; 385 | if ($this->do_debug >= 1) { 386 | echo '
';
387 |             foreach ($this->errors as $e) {
388 |                 print_r($e);
389 |             }
390 |             echo '
'; 391 | } 392 | } 393 | 394 | /** 395 | * Get an array of error messages, if any. 396 | * 397 | * @return array 398 | */ 399 | public function getErrors() 400 | { 401 | return $this->errors; 402 | } 403 | 404 | /** 405 | * POP3 connection error handler. 406 | * 407 | * @param int $errno 408 | * @param string $errstr 409 | * @param string $errfile 410 | * @param int $errline 411 | */ 412 | protected function catchWarning($errno, $errstr, $errfile, $errline) 413 | { 414 | $this->setError( 415 | 'Connecting to the POP3 server raised a PHP warning:' . 416 | "errno: $errno errstr: $errstr; errfile: $errfile; errline: $errline" 417 | ); 418 | } 419 | } 420 | -------------------------------------------------------------------------------- /email/src/SMTP.php: -------------------------------------------------------------------------------- 1 | 9 | * @author Jim Jagielski (jimjag) 10 | * @author Andy Prevost (codeworxtech) 11 | * @author Brent R. Matzelle (original founder) 12 | * @copyright 2012 - 2017 Marcus Bointon 13 | * @copyright 2010 - 2012 Jim Jagielski 14 | * @copyright 2004 - 2009 Andy Prevost 15 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 16 | * @note This program is distributed in the hope that it will be useful - WITHOUT 17 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 18 | * FITNESS FOR A PARTICULAR PURPOSE. 19 | */ 20 | 21 | namespace PHPMailer\PHPMailer; 22 | 23 | /** 24 | * PHPMailer RFC821 SMTP email transport class. 25 | * Implements RFC 821 SMTP commands and provides some utility methods for sending mail to an SMTP server. 26 | * 27 | * @author Chris Ryan 28 | * @author Marcus Bointon 29 | */ 30 | class SMTP 31 | { 32 | /** 33 | * The PHPMailer SMTP version number. 34 | * 35 | * @var string 36 | */ 37 | const VERSION = '6.0.7'; 38 | 39 | /** 40 | * SMTP line break constant. 41 | * 42 | * @var string 43 | */ 44 | const LE = "\r\n"; 45 | 46 | /** 47 | * The SMTP port to use if one is not specified. 48 | * 49 | * @var int 50 | */ 51 | const DEFAULT_PORT = 25; 52 | 53 | /** 54 | * The maximum line length allowed by RFC 2822 section 2.1.1. 55 | * 56 | * @var int 57 | */ 58 | const MAX_LINE_LENGTH = 998; 59 | 60 | /** 61 | * Debug level for no output. 62 | */ 63 | const DEBUG_OFF = 0; 64 | 65 | /** 66 | * Debug level to show client -> server messages. 67 | */ 68 | const DEBUG_CLIENT = 1; 69 | 70 | /** 71 | * Debug level to show client -> server and server -> client messages. 72 | */ 73 | const DEBUG_SERVER = 2; 74 | 75 | /** 76 | * Debug level to show connection status, client -> server and server -> client messages. 77 | */ 78 | const DEBUG_CONNECTION = 3; 79 | 80 | /** 81 | * Debug level to show all messages. 82 | */ 83 | const DEBUG_LOWLEVEL = 4; 84 | 85 | /** 86 | * Debug output level. 87 | * Options: 88 | * * self::DEBUG_OFF (`0`) No debug output, default 89 | * * self::DEBUG_CLIENT (`1`) Client commands 90 | * * self::DEBUG_SERVER (`2`) Client commands and server responses 91 | * * self::DEBUG_CONNECTION (`3`) As DEBUG_SERVER plus connection status 92 | * * self::DEBUG_LOWLEVEL (`4`) Low-level data output, all messages. 93 | * 94 | * @var int 95 | */ 96 | public $do_debug = self::DEBUG_OFF; 97 | 98 | /** 99 | * How to handle debug output. 100 | * Options: 101 | * * `echo` Output plain-text as-is, appropriate for CLI 102 | * * `html` Output escaped, line breaks converted to `
`, appropriate for browser output 103 | * * `error_log` Output to error log as configured in php.ini 104 | * Alternatively, you can provide a callable expecting two params: a message string and the debug level: 105 | * 106 | * ```php 107 | * $smtp->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";}; 108 | * ``` 109 | * 110 | * Alternatively, you can pass in an instance of a PSR-3 compatible logger, though only `debug` 111 | * level output is used: 112 | * 113 | * ```php 114 | * $mail->Debugoutput = new myPsr3Logger; 115 | * ``` 116 | * 117 | * @var string|callable|\Psr\Log\LoggerInterface 118 | */ 119 | public $Debugoutput = 'echo'; 120 | 121 | /** 122 | * Whether to use VERP. 123 | * 124 | * @see http://en.wikipedia.org/wiki/Variable_envelope_return_path 125 | * @see http://www.postfix.org/VERP_README.html Info on VERP 126 | * 127 | * @var bool 128 | */ 129 | public $do_verp = false; 130 | 131 | /** 132 | * The timeout value for connection, in seconds. 133 | * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2. 134 | * This needs to be quite high to function correctly with hosts using greetdelay as an anti-spam measure. 135 | * 136 | * @see http://tools.ietf.org/html/rfc2821#section-4.5.3.2 137 | * 138 | * @var int 139 | */ 140 | public $Timeout = 300; 141 | 142 | /** 143 | * How long to wait for commands to complete, in seconds. 144 | * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2. 145 | * 146 | * @var int 147 | */ 148 | public $Timelimit = 300; 149 | 150 | /** 151 | * Patterns to extract an SMTP transaction id from reply to a DATA command. 152 | * The first capture group in each regex will be used as the ID. 153 | * MS ESMTP returns the message ID, which may not be correct for internal tracking. 154 | * 155 | * @var string[] 156 | */ 157 | protected $smtp_transaction_id_patterns = [ 158 | 'exim' => '/[\d]{3} OK id=(.*)/', 159 | 'sendmail' => '/[\d]{3} 2.0.0 (.*) Message/', 160 | 'postfix' => '/[\d]{3} 2.0.0 Ok: queued as (.*)/', 161 | 'Microsoft_ESMTP' => '/[0-9]{3} 2.[\d].0 (.*)@(?:.*) Queued mail for delivery/', 162 | 'Amazon_SES' => '/[\d]{3} Ok (.*)/', 163 | 'SendGrid' => '/[\d]{3} Ok: queued as (.*)/', 164 | 'CampaignMonitor' => '/[\d]{3} 2.0.0 OK:([a-zA-Z\d]{48})/', 165 | ]; 166 | 167 | /** 168 | * The last transaction ID issued in response to a DATA command, 169 | * if one was detected. 170 | * 171 | * @var string|bool|null 172 | */ 173 | protected $last_smtp_transaction_id; 174 | 175 | /** 176 | * The socket for the server connection. 177 | * 178 | * @var ?resource 179 | */ 180 | protected $smtp_conn; 181 | 182 | /** 183 | * Error information, if any, for the last SMTP command. 184 | * 185 | * @var array 186 | */ 187 | protected $error = [ 188 | 'error' => '', 189 | 'detail' => '', 190 | 'smtp_code' => '', 191 | 'smtp_code_ex' => '', 192 | ]; 193 | 194 | /** 195 | * The reply the server sent to us for HELO. 196 | * If null, no HELO string has yet been received. 197 | * 198 | * @var string|null 199 | */ 200 | protected $helo_rply = null; 201 | 202 | /** 203 | * The set of SMTP extensions sent in reply to EHLO command. 204 | * Indexes of the array are extension names. 205 | * Value at index 'HELO' or 'EHLO' (according to command that was sent) 206 | * represents the server name. In case of HELO it is the only element of the array. 207 | * Other values can be boolean TRUE or an array containing extension options. 208 | * If null, no HELO/EHLO string has yet been received. 209 | * 210 | * @var array|null 211 | */ 212 | protected $server_caps = null; 213 | 214 | /** 215 | * The most recent reply received from the server. 216 | * 217 | * @var string 218 | */ 219 | protected $last_reply = ''; 220 | 221 | /** 222 | * Output debugging info via a user-selected method. 223 | * 224 | * @param string $str Debug string to output 225 | * @param int $level The debug level of this message; see DEBUG_* constants 226 | * 227 | * @see SMTP::$Debugoutput 228 | * @see SMTP::$do_debug 229 | */ 230 | protected function edebug($str, $level = 0) 231 | { 232 | if ($level > $this->do_debug) { 233 | return; 234 | } 235 | //Is this a PSR-3 logger? 236 | if ($this->Debugoutput instanceof \Psr\Log\LoggerInterface) { 237 | $this->Debugoutput->debug($str); 238 | 239 | return; 240 | } 241 | //Avoid clash with built-in function names 242 | if (!in_array($this->Debugoutput, ['error_log', 'html', 'echo']) and is_callable($this->Debugoutput)) { 243 | call_user_func($this->Debugoutput, $str, $level); 244 | 245 | return; 246 | } 247 | switch ($this->Debugoutput) { 248 | case 'error_log': 249 | //Don't output, just log 250 | error_log($str); 251 | break; 252 | case 'html': 253 | //Cleans up output a bit for a better looking, HTML-safe output 254 | echo gmdate('Y-m-d H:i:s'), ' ', htmlentities( 255 | preg_replace('/[\r\n]+/', '', $str), 256 | ENT_QUOTES, 257 | 'UTF-8' 258 | ), "
\n"; 259 | break; 260 | case 'echo': 261 | default: 262 | //Normalize line breaks 263 | $str = preg_replace('/\r\n|\r/ms', "\n", $str); 264 | echo gmdate('Y-m-d H:i:s'), 265 | "\t", 266 | //Trim trailing space 267 | trim( 268 | //Indent for readability, except for trailing break 269 | str_replace( 270 | "\n", 271 | "\n \t ", 272 | trim($str) 273 | ) 274 | ), 275 | "\n"; 276 | } 277 | } 278 | 279 | /** 280 | * Connect to an SMTP server. 281 | * 282 | * @param string $host SMTP server IP or host name 283 | * @param int $port The port number to connect to 284 | * @param int $timeout How long to wait for the connection to open 285 | * @param array $options An array of options for stream_context_create() 286 | * 287 | * @return bool 288 | */ 289 | public function connect($host, $port = null, $timeout = 30, $options = []) 290 | { 291 | static $streamok; 292 | //This is enabled by default since 5.0.0 but some providers disable it 293 | //Check this once and cache the result 294 | if (null === $streamok) { 295 | $streamok = function_exists('stream_socket_client'); 296 | } 297 | // Clear errors to avoid confusion 298 | $this->setError(''); 299 | // Make sure we are __not__ connected 300 | if ($this->connected()) { 301 | // Already connected, generate error 302 | $this->setError('Already connected to a server'); 303 | 304 | return false; 305 | } 306 | if (empty($port)) { 307 | $port = self::DEFAULT_PORT; 308 | } 309 | // Connect to the SMTP server 310 | $this->edebug( 311 | "Connection: opening to $host:$port, timeout=$timeout, options=" . 312 | (count($options) > 0 ? var_export($options, true) : 'array()'), 313 | self::DEBUG_CONNECTION 314 | ); 315 | $errno = 0; 316 | $errstr = ''; 317 | if ($streamok) { 318 | $socket_context = stream_context_create($options); 319 | set_error_handler([$this, 'errorHandler']); 320 | $this->smtp_conn = stream_socket_client( 321 | $host . ':' . $port, 322 | $errno, 323 | $errstr, 324 | $timeout, 325 | STREAM_CLIENT_CONNECT, 326 | $socket_context 327 | ); 328 | restore_error_handler(); 329 | } else { 330 | //Fall back to fsockopen which should work in more places, but is missing some features 331 | $this->edebug( 332 | 'Connection: stream_socket_client not available, falling back to fsockopen', 333 | self::DEBUG_CONNECTION 334 | ); 335 | set_error_handler([$this, 'errorHandler']); 336 | $this->smtp_conn = fsockopen( 337 | $host, 338 | $port, 339 | $errno, 340 | $errstr, 341 | $timeout 342 | ); 343 | restore_error_handler(); 344 | } 345 | // Verify we connected properly 346 | if (!is_resource($this->smtp_conn)) { 347 | $this->setError( 348 | 'Failed to connect to server', 349 | '', 350 | (string) $errno, 351 | (string) $errstr 352 | ); 353 | $this->edebug( 354 | 'SMTP ERROR: ' . $this->error['error'] 355 | . ": $errstr ($errno)", 356 | self::DEBUG_CLIENT 357 | ); 358 | 359 | return false; 360 | } 361 | $this->edebug('Connection: opened', self::DEBUG_CONNECTION); 362 | // SMTP server can take longer to respond, give longer timeout for first read 363 | // Windows does not have support for this timeout function 364 | if (substr(PHP_OS, 0, 3) != 'WIN') { 365 | $max = ini_get('max_execution_time'); 366 | // Don't bother if unlimited 367 | if (0 != $max and $timeout > $max) { 368 | @set_time_limit($timeout); 369 | } 370 | stream_set_timeout($this->smtp_conn, $timeout, 0); 371 | } 372 | // Get any announcement 373 | $announce = $this->get_lines(); 374 | $this->edebug('SERVER -> CLIENT: ' . $announce, self::DEBUG_SERVER); 375 | 376 | return true; 377 | } 378 | 379 | /** 380 | * Initiate a TLS (encrypted) session. 381 | * 382 | * @return bool 383 | */ 384 | public function startTLS() 385 | { 386 | if (!$this->sendCommand('STARTTLS', 'STARTTLS', 220)) { 387 | return false; 388 | } 389 | 390 | //Allow the best TLS version(s) we can 391 | $crypto_method = STREAM_CRYPTO_METHOD_TLS_CLIENT; 392 | 393 | //PHP 5.6.7 dropped inclusion of TLS 1.1 and 1.2 in STREAM_CRYPTO_METHOD_TLS_CLIENT 394 | //so add them back in manually if we can 395 | if (defined('STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT')) { 396 | $crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT; 397 | $crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT; 398 | } 399 | 400 | // Begin encrypted connection 401 | set_error_handler([$this, 'errorHandler']); 402 | $crypto_ok = stream_socket_enable_crypto( 403 | $this->smtp_conn, 404 | true, 405 | $crypto_method 406 | ); 407 | restore_error_handler(); 408 | 409 | return (bool) $crypto_ok; 410 | } 411 | 412 | /** 413 | * Perform SMTP authentication. 414 | * Must be run after hello(). 415 | * 416 | * @see hello() 417 | * 418 | * @param string $username The user name 419 | * @param string $password The password 420 | * @param string $authtype The auth type (CRAM-MD5, PLAIN, LOGIN, XOAUTH2) 421 | * @param OAuth $OAuth An optional OAuth instance for XOAUTH2 authentication 422 | * 423 | * @return bool True if successfully authenticated 424 | */ 425 | public function authenticate( 426 | $username, 427 | $password, 428 | $authtype = null, 429 | $OAuth = null 430 | ) { 431 | if (!$this->server_caps) { 432 | $this->setError('Authentication is not allowed before HELO/EHLO'); 433 | 434 | return false; 435 | } 436 | 437 | if (array_key_exists('EHLO', $this->server_caps)) { 438 | // SMTP extensions are available; try to find a proper authentication method 439 | if (!array_key_exists('AUTH', $this->server_caps)) { 440 | $this->setError('Authentication is not allowed at this stage'); 441 | // 'at this stage' means that auth may be allowed after the stage changes 442 | // e.g. after STARTTLS 443 | 444 | return false; 445 | } 446 | 447 | $this->edebug('Auth method requested: ' . ($authtype ? $authtype : 'UNSPECIFIED'), self::DEBUG_LOWLEVEL); 448 | $this->edebug( 449 | 'Auth methods available on the server: ' . implode(',', $this->server_caps['AUTH']), 450 | self::DEBUG_LOWLEVEL 451 | ); 452 | 453 | //If we have requested a specific auth type, check the server supports it before trying others 454 | if (null !== $authtype and !in_array($authtype, $this->server_caps['AUTH'])) { 455 | $this->edebug('Requested auth method not available: ' . $authtype, self::DEBUG_LOWLEVEL); 456 | $authtype = null; 457 | } 458 | 459 | if (empty($authtype)) { 460 | //If no auth mechanism is specified, attempt to use these, in this order 461 | //Try CRAM-MD5 first as it's more secure than the others 462 | foreach (['CRAM-MD5', 'LOGIN', 'PLAIN', 'XOAUTH2'] as $method) { 463 | if (in_array($method, $this->server_caps['AUTH'])) { 464 | $authtype = $method; 465 | break; 466 | } 467 | } 468 | if (empty($authtype)) { 469 | $this->setError('No supported authentication methods found'); 470 | 471 | return false; 472 | } 473 | self::edebug('Auth method selected: ' . $authtype, self::DEBUG_LOWLEVEL); 474 | } 475 | 476 | if (!in_array($authtype, $this->server_caps['AUTH'])) { 477 | $this->setError("The requested authentication method \"$authtype\" is not supported by the server"); 478 | 479 | return false; 480 | } 481 | } elseif (empty($authtype)) { 482 | $authtype = 'LOGIN'; 483 | } 484 | switch ($authtype) { 485 | case 'PLAIN': 486 | // Start authentication 487 | if (!$this->sendCommand('AUTH', 'AUTH PLAIN', 334)) { 488 | return false; 489 | } 490 | // Send encoded username and password 491 | if (!$this->sendCommand( 492 | 'User & Password', 493 | base64_encode("\0" . $username . "\0" . $password), 494 | 235 495 | ) 496 | ) { 497 | return false; 498 | } 499 | break; 500 | case 'LOGIN': 501 | // Start authentication 502 | if (!$this->sendCommand('AUTH', 'AUTH LOGIN', 334)) { 503 | return false; 504 | } 505 | if (!$this->sendCommand('Username', base64_encode($username), 334)) { 506 | return false; 507 | } 508 | if (!$this->sendCommand('Password', base64_encode($password), 235)) { 509 | return false; 510 | } 511 | break; 512 | case 'CRAM-MD5': 513 | // Start authentication 514 | if (!$this->sendCommand('AUTH CRAM-MD5', 'AUTH CRAM-MD5', 334)) { 515 | return false; 516 | } 517 | // Get the challenge 518 | $challenge = base64_decode(substr($this->last_reply, 4)); 519 | 520 | // Build the response 521 | $response = $username . ' ' . $this->hmac($challenge, $password); 522 | 523 | // send encoded credentials 524 | return $this->sendCommand('Username', base64_encode($response), 235); 525 | case 'XOAUTH2': 526 | //The OAuth instance must be set up prior to requesting auth. 527 | if (null === $OAuth) { 528 | return false; 529 | } 530 | $oauth = $OAuth->getOauth64(); 531 | 532 | // Start authentication 533 | if (!$this->sendCommand('AUTH', 'AUTH XOAUTH2 ' . $oauth, 235)) { 534 | return false; 535 | } 536 | break; 537 | default: 538 | $this->setError("Authentication method \"$authtype\" is not supported"); 539 | 540 | return false; 541 | } 542 | 543 | return true; 544 | } 545 | 546 | /** 547 | * Calculate an MD5 HMAC hash. 548 | * Works like hash_hmac('md5', $data, $key) 549 | * in case that function is not available. 550 | * 551 | * @param string $data The data to hash 552 | * @param string $key The key to hash with 553 | * 554 | * @return string 555 | */ 556 | protected function hmac($data, $key) 557 | { 558 | if (function_exists('hash_hmac')) { 559 | return hash_hmac('md5', $data, $key); 560 | } 561 | 562 | // The following borrowed from 563 | // http://php.net/manual/en/function.mhash.php#27225 564 | 565 | // RFC 2104 HMAC implementation for php. 566 | // Creates an md5 HMAC. 567 | // Eliminates the need to install mhash to compute a HMAC 568 | // by Lance Rushing 569 | 570 | $bytelen = 64; // byte length for md5 571 | if (strlen($key) > $bytelen) { 572 | $key = pack('H*', md5($key)); 573 | } 574 | $key = str_pad($key, $bytelen, chr(0x00)); 575 | $ipad = str_pad('', $bytelen, chr(0x36)); 576 | $opad = str_pad('', $bytelen, chr(0x5c)); 577 | $k_ipad = $key ^ $ipad; 578 | $k_opad = $key ^ $opad; 579 | 580 | return md5($k_opad . pack('H*', md5($k_ipad . $data))); 581 | } 582 | 583 | /** 584 | * Check connection state. 585 | * 586 | * @return bool True if connected 587 | */ 588 | public function connected() 589 | { 590 | if (is_resource($this->smtp_conn)) { 591 | $sock_status = stream_get_meta_data($this->smtp_conn); 592 | if ($sock_status['eof']) { 593 | // The socket is valid but we are not connected 594 | $this->edebug( 595 | 'SMTP NOTICE: EOF caught while checking if connected', 596 | self::DEBUG_CLIENT 597 | ); 598 | $this->close(); 599 | 600 | return false; 601 | } 602 | 603 | return true; // everything looks good 604 | } 605 | 606 | return false; 607 | } 608 | 609 | /** 610 | * Close the socket and clean up the state of the class. 611 | * Don't use this function without first trying to use QUIT. 612 | * 613 | * @see quit() 614 | */ 615 | public function close() 616 | { 617 | $this->setError(''); 618 | $this->server_caps = null; 619 | $this->helo_rply = null; 620 | if (is_resource($this->smtp_conn)) { 621 | // close the connection and cleanup 622 | fclose($this->smtp_conn); 623 | $this->smtp_conn = null; //Makes for cleaner serialization 624 | $this->edebug('Connection: closed', self::DEBUG_CONNECTION); 625 | } 626 | } 627 | 628 | /** 629 | * Send an SMTP DATA command. 630 | * Issues a data command and sends the msg_data to the server, 631 | * finializing the mail transaction. $msg_data is the message 632 | * that is to be send with the headers. Each header needs to be 633 | * on a single line followed by a with the message headers 634 | * and the message body being separated by an additional . 635 | * Implements RFC 821: DATA . 636 | * 637 | * @param string $msg_data Message data to send 638 | * 639 | * @return bool 640 | */ 641 | public function data($msg_data) 642 | { 643 | //This will use the standard timelimit 644 | if (!$this->sendCommand('DATA', 'DATA', 354)) { 645 | return false; 646 | } 647 | 648 | /* The server is ready to accept data! 649 | * According to rfc821 we should not send more than 1000 characters on a single line (including the LE) 650 | * so we will break the data up into lines by \r and/or \n then if needed we will break each of those into 651 | * smaller lines to fit within the limit. 652 | * We will also look for lines that start with a '.' and prepend an additional '.'. 653 | * NOTE: this does not count towards line-length limit. 654 | */ 655 | 656 | // Normalize line breaks before exploding 657 | $lines = explode("\n", str_replace(["\r\n", "\r"], "\n", $msg_data)); 658 | 659 | /* To distinguish between a complete RFC822 message and a plain message body, we check if the first field 660 | * of the first line (':' separated) does not contain a space then it _should_ be a header and we will 661 | * process all lines before a blank line as headers. 662 | */ 663 | 664 | $field = substr($lines[0], 0, strpos($lines[0], ':')); 665 | $in_headers = false; 666 | if (!empty($field) and strpos($field, ' ') === false) { 667 | $in_headers = true; 668 | } 669 | 670 | foreach ($lines as $line) { 671 | $lines_out = []; 672 | if ($in_headers and $line == '') { 673 | $in_headers = false; 674 | } 675 | //Break this line up into several smaller lines if it's too long 676 | //Micro-optimisation: isset($str[$len]) is faster than (strlen($str) > $len), 677 | while (isset($line[self::MAX_LINE_LENGTH])) { 678 | //Working backwards, try to find a space within the last MAX_LINE_LENGTH chars of the line to break on 679 | //so as to avoid breaking in the middle of a word 680 | $pos = strrpos(substr($line, 0, self::MAX_LINE_LENGTH), ' '); 681 | //Deliberately matches both false and 0 682 | if (!$pos) { 683 | //No nice break found, add a hard break 684 | $pos = self::MAX_LINE_LENGTH - 1; 685 | $lines_out[] = substr($line, 0, $pos); 686 | $line = substr($line, $pos); 687 | } else { 688 | //Break at the found point 689 | $lines_out[] = substr($line, 0, $pos); 690 | //Move along by the amount we dealt with 691 | $line = substr($line, $pos + 1); 692 | } 693 | //If processing headers add a LWSP-char to the front of new line RFC822 section 3.1.1 694 | if ($in_headers) { 695 | $line = "\t" . $line; 696 | } 697 | } 698 | $lines_out[] = $line; 699 | 700 | //Send the lines to the server 701 | foreach ($lines_out as $line_out) { 702 | //RFC2821 section 4.5.2 703 | if (!empty($line_out) and $line_out[0] == '.') { 704 | $line_out = '.' . $line_out; 705 | } 706 | $this->client_send($line_out . static::LE, 'DATA'); 707 | } 708 | } 709 | 710 | //Message data has been sent, complete the command 711 | //Increase timelimit for end of DATA command 712 | $savetimelimit = $this->Timelimit; 713 | $this->Timelimit = $this->Timelimit * 2; 714 | $result = $this->sendCommand('DATA END', '.', 250); 715 | $this->recordLastTransactionID(); 716 | //Restore timelimit 717 | $this->Timelimit = $savetimelimit; 718 | 719 | return $result; 720 | } 721 | 722 | /** 723 | * Send an SMTP HELO or EHLO command. 724 | * Used to identify the sending server to the receiving server. 725 | * This makes sure that client and server are in a known state. 726 | * Implements RFC 821: HELO 727 | * and RFC 2821 EHLO. 728 | * 729 | * @param string $host The host name or IP to connect to 730 | * 731 | * @return bool 732 | */ 733 | public function hello($host = '') 734 | { 735 | //Try extended hello first (RFC 2821) 736 | return $this->sendHello('EHLO', $host) or $this->sendHello('HELO', $host); 737 | } 738 | 739 | /** 740 | * Send an SMTP HELO or EHLO command. 741 | * Low-level implementation used by hello(). 742 | * 743 | * @param string $hello The HELO string 744 | * @param string $host The hostname to say we are 745 | * 746 | * @return bool 747 | * 748 | * @see hello() 749 | */ 750 | protected function sendHello($hello, $host) 751 | { 752 | $noerror = $this->sendCommand($hello, $hello . ' ' . $host, 250); 753 | $this->helo_rply = $this->last_reply; 754 | if ($noerror) { 755 | $this->parseHelloFields($hello); 756 | } else { 757 | $this->server_caps = null; 758 | } 759 | 760 | return $noerror; 761 | } 762 | 763 | /** 764 | * Parse a reply to HELO/EHLO command to discover server extensions. 765 | * In case of HELO, the only parameter that can be discovered is a server name. 766 | * 767 | * @param string $type `HELO` or `EHLO` 768 | */ 769 | protected function parseHelloFields($type) 770 | { 771 | $this->server_caps = []; 772 | $lines = explode("\n", $this->helo_rply); 773 | 774 | foreach ($lines as $n => $s) { 775 | //First 4 chars contain response code followed by - or space 776 | $s = trim(substr($s, 4)); 777 | if (empty($s)) { 778 | continue; 779 | } 780 | $fields = explode(' ', $s); 781 | if (!empty($fields)) { 782 | if (!$n) { 783 | $name = $type; 784 | $fields = $fields[0]; 785 | } else { 786 | $name = array_shift($fields); 787 | switch ($name) { 788 | case 'SIZE': 789 | $fields = ($fields ? $fields[0] : 0); 790 | break; 791 | case 'AUTH': 792 | if (!is_array($fields)) { 793 | $fields = []; 794 | } 795 | break; 796 | default: 797 | $fields = true; 798 | } 799 | } 800 | $this->server_caps[$name] = $fields; 801 | } 802 | } 803 | } 804 | 805 | /** 806 | * Send an SMTP MAIL command. 807 | * Starts a mail transaction from the email address specified in 808 | * $from. Returns true if successful or false otherwise. If True 809 | * the mail transaction is started and then one or more recipient 810 | * commands may be called followed by a data command. 811 | * Implements RFC 821: MAIL FROM: . 812 | * 813 | * @param string $from Source address of this message 814 | * 815 | * @return bool 816 | */ 817 | public function mail($from) 818 | { 819 | $useVerp = ($this->do_verp ? ' XVERP' : ''); 820 | 821 | return $this->sendCommand( 822 | 'MAIL FROM', 823 | 'MAIL FROM:<' . $from . '>' . $useVerp, 824 | 250 825 | ); 826 | } 827 | 828 | /** 829 | * Send an SMTP QUIT command. 830 | * Closes the socket if there is no error or the $close_on_error argument is true. 831 | * Implements from RFC 821: QUIT . 832 | * 833 | * @param bool $close_on_error Should the connection close if an error occurs? 834 | * 835 | * @return bool 836 | */ 837 | public function quit($close_on_error = true) 838 | { 839 | $noerror = $this->sendCommand('QUIT', 'QUIT', 221); 840 | $err = $this->error; //Save any error 841 | if ($noerror or $close_on_error) { 842 | $this->close(); 843 | $this->error = $err; //Restore any error from the quit command 844 | } 845 | 846 | return $noerror; 847 | } 848 | 849 | /** 850 | * Send an SMTP RCPT command. 851 | * Sets the TO argument to $toaddr. 852 | * Returns true if the recipient was accepted false if it was rejected. 853 | * Implements from RFC 821: RCPT TO: . 854 | * 855 | * @param string $address The address the message is being sent to 856 | * @param string $dsn Comma separated list of DSN notifications. NEVER, SUCCESS, FAILURE 857 | * or DELAY. If you specify NEVER all other notifications are ignored. 858 | * 859 | * @return bool 860 | */ 861 | public function recipient($address, $dsn = '') 862 | { 863 | if (empty($dsn)) { 864 | $rcpt = 'RCPT TO:<' . $address . '>'; 865 | } else { 866 | $dsn = strtoupper($dsn); 867 | $notify = []; 868 | 869 | if (strpos($dsn, 'NEVER') !== false) { 870 | $notify[] = 'NEVER'; 871 | } else { 872 | foreach (['SUCCESS', 'FAILURE', 'DELAY'] as $value) { 873 | if (strpos($dsn, $value) !== false) { 874 | $notify[] = $value; 875 | } 876 | } 877 | } 878 | 879 | $rcpt = 'RCPT TO:<' . $address . '> NOTIFY=' . implode(',', $notify); 880 | } 881 | 882 | return $this->sendCommand( 883 | 'RCPT TO', 884 | $rcpt, 885 | [250, 251] 886 | ); 887 | } 888 | 889 | /** 890 | * Send an SMTP RSET command. 891 | * Abort any transaction that is currently in progress. 892 | * Implements RFC 821: RSET . 893 | * 894 | * @return bool True on success 895 | */ 896 | public function reset() 897 | { 898 | return $this->sendCommand('RSET', 'RSET', 250); 899 | } 900 | 901 | /** 902 | * Send a command to an SMTP server and check its return code. 903 | * 904 | * @param string $command The command name - not sent to the server 905 | * @param string $commandstring The actual command to send 906 | * @param int|array $expect One or more expected integer success codes 907 | * 908 | * @return bool True on success 909 | */ 910 | protected function sendCommand($command, $commandstring, $expect) 911 | { 912 | if (!$this->connected()) { 913 | $this->setError("Called $command without being connected"); 914 | 915 | return false; 916 | } 917 | //Reject line breaks in all commands 918 | if (strpos($commandstring, "\n") !== false or strpos($commandstring, "\r") !== false) { 919 | $this->setError("Command '$command' contained line breaks"); 920 | 921 | return false; 922 | } 923 | $this->client_send($commandstring . static::LE, $command); 924 | 925 | $this->last_reply = $this->get_lines(); 926 | // Fetch SMTP code and possible error code explanation 927 | $matches = []; 928 | if (preg_match('/^([0-9]{3})[ -](?:([0-9]\\.[0-9]\\.[0-9]{1,2}) )?/', $this->last_reply, $matches)) { 929 | $code = $matches[1]; 930 | $code_ex = (count($matches) > 2 ? $matches[2] : null); 931 | // Cut off error code from each response line 932 | $detail = preg_replace( 933 | "/{$code}[ -]" . 934 | ($code_ex ? str_replace('.', '\\.', $code_ex) . ' ' : '') . '/m', 935 | '', 936 | $this->last_reply 937 | ); 938 | } else { 939 | // Fall back to simple parsing if regex fails 940 | $code = substr($this->last_reply, 0, 3); 941 | $code_ex = null; 942 | $detail = substr($this->last_reply, 4); 943 | } 944 | 945 | $this->edebug('SERVER -> CLIENT: ' . $this->last_reply, self::DEBUG_SERVER); 946 | 947 | if (!in_array($code, (array) $expect)) { 948 | $this->setError( 949 | "$command command failed", 950 | $detail, 951 | $code, 952 | $code_ex 953 | ); 954 | $this->edebug( 955 | 'SMTP ERROR: ' . $this->error['error'] . ': ' . $this->last_reply, 956 | self::DEBUG_CLIENT 957 | ); 958 | 959 | return false; 960 | } 961 | 962 | $this->setError(''); 963 | 964 | return true; 965 | } 966 | 967 | /** 968 | * Send an SMTP SAML command. 969 | * Starts a mail transaction from the email address specified in $from. 970 | * Returns true if successful or false otherwise. If True 971 | * the mail transaction is started and then one or more recipient 972 | * commands may be called followed by a data command. This command 973 | * will send the message to the users terminal if they are logged 974 | * in and send them an email. 975 | * Implements RFC 821: SAML FROM: . 976 | * 977 | * @param string $from The address the message is from 978 | * 979 | * @return bool 980 | */ 981 | public function sendAndMail($from) 982 | { 983 | return $this->sendCommand('SAML', "SAML FROM:$from", 250); 984 | } 985 | 986 | /** 987 | * Send an SMTP VRFY command. 988 | * 989 | * @param string $name The name to verify 990 | * 991 | * @return bool 992 | */ 993 | public function verify($name) 994 | { 995 | return $this->sendCommand('VRFY', "VRFY $name", [250, 251]); 996 | } 997 | 998 | /** 999 | * Send an SMTP NOOP command. 1000 | * Used to keep keep-alives alive, doesn't actually do anything. 1001 | * 1002 | * @return bool 1003 | */ 1004 | public function noop() 1005 | { 1006 | return $this->sendCommand('NOOP', 'NOOP', 250); 1007 | } 1008 | 1009 | /** 1010 | * Send an SMTP TURN command. 1011 | * This is an optional command for SMTP that this class does not support. 1012 | * This method is here to make the RFC821 Definition complete for this class 1013 | * and _may_ be implemented in future. 1014 | * Implements from RFC 821: TURN . 1015 | * 1016 | * @return bool 1017 | */ 1018 | public function turn() 1019 | { 1020 | $this->setError('The SMTP TURN command is not implemented'); 1021 | $this->edebug('SMTP NOTICE: ' . $this->error['error'], self::DEBUG_CLIENT); 1022 | 1023 | return false; 1024 | } 1025 | 1026 | /** 1027 | * Send raw data to the server. 1028 | * 1029 | * @param string $data The data to send 1030 | * @param string $command Optionally, the command this is part of, used only for controlling debug output 1031 | * 1032 | * @return int|bool The number of bytes sent to the server or false on error 1033 | */ 1034 | public function client_send($data, $command = '') 1035 | { 1036 | //If SMTP transcripts are left enabled, or debug output is posted online 1037 | //it can leak credentials, so hide credentials in all but lowest level 1038 | if (self::DEBUG_LOWLEVEL > $this->do_debug and 1039 | in_array($command, ['User & Password', 'Username', 'Password'], true)) { 1040 | $this->edebug('CLIENT -> SERVER: