├── PHPMailer ├── VERSION ├── examples │ ├── contents.html │ ├── styles │ │ ├── wrapping.png │ │ ├── shThemeAppleScript.css │ │ ├── shThemeEmacs.css │ │ ├── shThemeMDUltra.css │ │ ├── shThemeRDark.css │ │ ├── shThemeMidnight.css │ │ ├── shThemeDefault.css │ │ ├── shThemeVisualStudio.css │ │ ├── shThemeFadeToGrey.css │ │ ├── shThemeDjango.css │ │ ├── shThemeEclipse.css │ │ ├── shCore.css │ │ ├── shCoreEmacs.css │ │ ├── shCoreMDUltra.css │ │ └── shCoreRDark.css │ ├── images │ │ ├── phpmailer.png │ │ └── phpmailer_mini.png │ ├── contentsutf8.html │ ├── mail.phps │ ├── sendmail.phps │ ├── DKIM.phps │ ├── exceptions.phps │ ├── send_multiple_file_upload.phps │ ├── send_file_upload.phps │ ├── smtp_no_auth.phps │ ├── smtp.phps │ ├── smtp_check.phps │ ├── ssl_options.phps │ ├── pop_before_smtp.phps │ ├── gmail.phps │ ├── mailing_list.phps │ ├── contactform.phps │ ├── gmail_xoauth.phps │ ├── scripts │ │ ├── shAutoloader.js │ │ ├── shLegacy.js │ │ └── shBrushPhp.js │ ├── signed-mail.phps │ └── index.html ├── language │ ├── phpmailer.lang-zh_cn.php │ ├── phpmailer.lang-zh.php │ ├── phpmailer.lang-ch.php │ ├── phpmailer.lang-ko.php │ ├── phpmailer.lang-he.php │ ├── phpmailer.lang-ja.php │ ├── phpmailer.lang-nb.php │ ├── phpmailer.lang-cs.php │ ├── phpmailer.lang-lv.php │ ├── phpmailer.lang-sv.php │ ├── phpmailer.lang-vi.php │ ├── phpmailer.lang-da.php │ ├── phpmailer.lang-lt.php │ ├── phpmailer.lang-fo.php │ ├── phpmailer.lang-nl.php │ ├── phpmailer.lang-eo.php │ ├── phpmailer.lang-az.php │ ├── phpmailer.lang-hu.php │ ├── phpmailer.lang-ar.php │ ├── phpmailer.lang-sk.php │ ├── phpmailer.lang-fa.php │ ├── phpmailer.lang-be.php │ ├── phpmailer.lang-am.php │ ├── phpmailer.lang-ca.php │ ├── phpmailer.lang-tr.php │ ├── phpmailer.lang-bg.php │ ├── phpmailer.lang-es.php │ ├── phpmailer.lang-sl.php │ ├── phpmailer.lang-fi.php │ ├── phpmailer.lang-et.php │ ├── phpmailer.lang-ro.php │ ├── phpmailer.lang-gl.php │ ├── phpmailer.lang-sr.php │ ├── phpmailer.lang-hr.php │ ├── phpmailer.lang-ms.php │ ├── phpmailer.lang-de.php │ ├── phpmailer.lang-id.php │ ├── phpmailer.lang-pl.php │ ├── phpmailer.lang-el.php │ ├── phpmailer.lang-ru.php │ ├── phpmailer.lang-ka.php │ ├── phpmailer.lang-uk.php │ ├── phpmailer.lang-it.php │ ├── phpmailer.lang-pt_br.php │ ├── phpmailer.lang-pt.php │ └── phpmailer.lang-fr.php ├── extras │ ├── README.md │ ├── EasyPeasyICS.php │ └── ntlm_sasl_client.php ├── PHPMailerAutoload.php ├── composer.json ├── class.phpmaileroauthgoogle.php └── get_oauth_token.php ├── do_queue.php ├── README.md ├── database.sql ├── queue.php └── register.php /PHPMailer/VERSION: -------------------------------------------------------------------------------- 1 | 5.2.23 2 | -------------------------------------------------------------------------------- /do_queue.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /PHPMailer/examples/contents.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxhsea/sendEmail/HEAD/PHPMailer/examples/contents.html -------------------------------------------------------------------------------- /PHPMailer/examples/styles/wrapping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxhsea/sendEmail/HEAD/PHPMailer/examples/styles/wrapping.png -------------------------------------------------------------------------------- /PHPMailer/examples/images/phpmailer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxhsea/sendEmail/HEAD/PHPMailer/examples/images/phpmailer.png -------------------------------------------------------------------------------- /PHPMailer/examples/images/phpmailer_mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxhsea/sendEmail/HEAD/PHPMailer/examples/images/phpmailer_mini.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PHP模拟队列发送邮件 2 | - 用PHPMailer类,实现邮件发送。 3 | - 建立数据表 4 | - Mysql+php实现轮询 实现队列 5 | - cli命令模式测试队列 6 | - 测试邮箱是163的邮箱(不需要要对email和密码进行base64编码) 7 | - 使用PDO操作、连接数据库 8 | -------------------------------------------------------------------------------- /database.sql: -------------------------------------------------------------------------------- 1 | create table users ( 2 | user_id int(5) not null auto_increment, 3 | user_email varchar(40) not null, 4 | user_password char(32) not null, 5 | primary key(user_id) 6 | )engine=myisam default charset=utf8; 7 | 8 | create table task_list ( 9 | task_id int(5) not null auto_increment, 10 | user_email varchar(40) not null, 11 | status int(2) not null, 12 | create_time datetime not null, 13 | update_time datetime not null, 14 | primary key(task_id) 15 | )engine=myisam default charset utf8; 16 | 17 | 18 | 19 | insert into task_list(user_email,status,create_time,update_time) 20 | VALUES( 'phpjiaoxuedev@sina.com', 0, now(), now() ); 21 | insert into task_list(user_email,status,create_time,update_time) 22 | VALUES( 'phpjiaoxuedev1@sina.com', 0, now(), now() ); 23 | -------------------------------------------------------------------------------- /PHPMailer/examples/contentsutf8.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PHPMailer Test 6 | 7 | 8 |
9 |

This is a test of PHPMailer.

10 |
11 | PHPMailer rocks 12 |
13 |

This example uses HTML.

14 |

Chinese text: 郵件內容為空

15 |

Russian text: Пустое тело сообщения

16 |

Armenian text: Հաղորդագրությունը դատարկ է

17 |

Czech text: Prázdné tělo zprávy

18 |

Emoji: 😂 🦄 💥 📤 📧

19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /PHPMailer/examples/mail.phps: -------------------------------------------------------------------------------- 1 | setFrom('from@example.com', 'First Last'); 12 | //Set an alternative reply-to address 13 | $mail->addReplyTo('replyto@example.com', 'First Last'); 14 | //Set who the message is to be sent to 15 | $mail->addAddress('whoto@example.com', 'John Doe'); 16 | //Set the subject line 17 | $mail->Subject = 'PHPMailer mail() test'; 18 | //Read an HTML message body from an external file, convert referenced images to embedded, 19 | //convert HTML into a basic plain-text alternative body 20 | $mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__)); 21 | //Replace the plain text body with one created manually 22 | $mail->AltBody = 'This is a plain-text message body'; 23 | //Attach an image file 24 | $mail->addAttachment('images/phpmailer_mini.png'); 25 | 26 | //send the message, check for errors 27 | if (!$mail->send()) { 28 | echo "Mailer Error: " . $mail->ErrorInfo; 29 | } else { 30 | echo "Message sent!"; 31 | } 32 | -------------------------------------------------------------------------------- /PHPMailer/examples/sendmail.phps: -------------------------------------------------------------------------------- 1 | isSendmail(); 12 | //Set who the message is to be sent from 13 | $mail->setFrom('from@example.com', 'First Last'); 14 | //Set an alternative reply-to address 15 | $mail->addReplyTo('replyto@example.com', 'First Last'); 16 | //Set who the message is to be sent to 17 | $mail->addAddress('whoto@example.com', 'John Doe'); 18 | //Set the subject line 19 | $mail->Subject = 'PHPMailer sendmail test'; 20 | //Read an HTML message body from an external file, convert referenced images to embedded, 21 | //convert HTML into a basic plain-text alternative body 22 | $mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__)); 23 | //Replace the plain text body with one created manually 24 | $mail->AltBody = 'This is a plain-text message body'; 25 | //Attach an image file 26 | $mail->addAttachment('images/phpmailer_mini.png'); 27 | 28 | //send the message, check for errors 29 | if (!$mail->send()) { 30 | echo "Mailer Error: " . $mail->ErrorInfo; 31 | } else { 32 | echo "Message sent!"; 33 | } 34 | -------------------------------------------------------------------------------- /PHPMailer/language/phpmailer.lang-zh_cn.php: -------------------------------------------------------------------------------- 1 | 6 | * @author young 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'] = '发送地址错误:'; 18 | $PHPMAILER_LANG['instantiate'] = '未知函数调用。'; 19 | $PHPMAILER_LANG['invalid_address'] = '发送失败,电子邮箱地址是无效的:'; 20 | $PHPMAILER_LANG['mailer_not_supported'] = '发信客户端不被支持。'; 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服务器出错: '; 26 | $PHPMAILER_LANG['variable_set'] = '无法设置或重置变量:'; 27 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 28 | -------------------------------------------------------------------------------- /PHPMailer/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 | -------------------------------------------------------------------------------- /PHPMailer/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 | -------------------------------------------------------------------------------- /PHPMailer/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 | -------------------------------------------------------------------------------- /PHPMailer/examples/DKIM.phps: -------------------------------------------------------------------------------- 1 | setFrom('from@example.com', 'First Last'); 16 | //Set an alternative reply-to address 17 | $mail->addReplyTo('replyto@example.com', 'First Last'); 18 | //Set who the message is to be sent to 19 | $mail->addAddress('whoto@example.com', 'John Doe'); 20 | //Set the subject line 21 | $mail->Subject = 'PHPMailer DKIM test'; 22 | //This should be the same as the domain of your From address 23 | $mail->DKIM_domain = 'example.com'; 24 | //Path to your private key file 25 | $mail->DKIM_private = 'dkim_private.pem'; 26 | //Set this to your own selector 27 | $mail->DKIM_selector = 'phpmailer'; 28 | //If your private key has a passphrase, set it here 29 | $mail->DKIM_passphrase = ''; 30 | //The identity you're signing as - usually your From address 31 | $mail->DKIM_identity = $mail->From; 32 | 33 | //send the message, check for errors 34 | if (!$mail->send()) { 35 | echo "Mailer Error: " . $mail->ErrorInfo; 36 | } else { 37 | echo "Message sent!"; 38 | } 39 | -------------------------------------------------------------------------------- /PHPMailer/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 | -------------------------------------------------------------------------------- /PHPMailer/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 | -------------------------------------------------------------------------------- /PHPMailer/examples/exceptions.phps: -------------------------------------------------------------------------------- 1 | setFrom('from@example.com', 'First Last'); 14 | //Set an alternative reply-to address 15 | $mail->addReplyTo('replyto@example.com', 'First Last'); 16 | //Set who the message is to be sent to 17 | $mail->addAddress('whoto@example.com', 'John Doe'); 18 | //Set the subject line 19 | $mail->Subject = 'PHPMailer Exceptions test'; 20 | //Read an HTML message body from an external file, convert referenced images to embedded, 21 | //and convert the HTML into a basic plain-text alternative body 22 | $mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__)); 23 | //Replace the plain text body with one created manually 24 | $mail->AltBody = 'This is a plain-text message body'; 25 | //Attach an image file 26 | $mail->addAttachment('images/phpmailer_mini.png'); 27 | //send the message 28 | //Note that we don't need check the response from this because it will throw an exception if it has trouble 29 | $mail->send(); 30 | echo "Message sent!"; 31 | } catch (phpmailerException $e) { 32 | echo $e->errorMessage(); //Pretty error messages from PHPMailer 33 | } catch (Exception $e) { 34 | echo $e->getMessage(); //Boring error messages from anything else! 35 | } 36 | -------------------------------------------------------------------------------- /PHPMailer/extras/README.md: -------------------------------------------------------------------------------- 1 | #PHPMailer Extras 2 | 3 | These classes provide optional additional functions to PHPMailer. 4 | 5 | These are not loaded by the PHPMailer autoloader, so in some cases you may need to `require` them yourself before using them. 6 | 7 | ##EasyPeasyICS 8 | 9 | This class was originally written by Manuel Reinhard and provides a simple means of generating ICS/vCal files that are used in sending calendar events. PHPMailer does not use it directly, but you can use it to generate content appropriate for placing in the `Ical` property of PHPMailer. The PHPMailer project is now its official home as Manuel has given permission for that and is no longer maintaining it himself. 10 | 11 | ##htmlfilter 12 | 13 | This class by Konstantin Riabitsev and Jim Jagielski implements HTML filtering to remove potentially malicious tags, such as ` 8 | 9 | 10 | 11 | "set names utf8")); 19 | 20 | //sql查询 21 | $sql = 'SELECT * FROM `users` WHERE `user_email` = :user_email'; 22 | 23 | //预处理 24 | $stmt = $db->prepare($sql); 25 | 26 | //绑定变量 27 | $stmt->bindParam(':user_email',$user_email); 28 | 29 | //执行操作 30 | $stmt->execute(); 31 | 32 | //获取结果集 33 | $res = $stmt->fetchAll(); 34 | 35 | if($res){ 36 | echo ""; 37 | }else{ 38 | //新增sql 39 | $sql_inserts = 'INSERT INTO `users`(`user_email`,`user_password`) VALUES(:user_email,:user_password)'; 40 | 41 | //预处理 42 | $inserts = $db->prepare($sql_inserts); 43 | 44 | //绑定变量 45 | $inserts->bindParam(':user_email',$user_email); 46 | $inserts->bindParam(':user_password',$user_password); 47 | 48 | //执行操作 49 | $inserts->execute(); 50 | 51 | if($inserts){ 52 | //获取时间 53 | $create_time = date("Y-m-d H:i:s"); 54 | $update_time = date("Y-m-d H:i:s"); 55 | 56 | //新增task sql 57 | $sql_task = 'INSERT INTO `task_list`(`user_email`,`status`,`create_time`,`update_time`) VALUES(:user_email,0,:create_time,:update_time)'; 58 | 59 | //预处理 60 | $tasks = $db->prepare($sql_task); 61 | 62 | //绑定变量 63 | $tasks->bindParam(':user_email',$user_email); 64 | $tasks->bindParam(':create_time',$create_time); 65 | $tasks->bindParam(':update_time',$update_time); 66 | 67 | //执行操作 68 | $tasks->execute(); 69 | if($tasks){ 70 | echo ""; 71 | } 72 | }else{ 73 | echo ""; 74 | } 75 | } 76 | } 77 | ?> 78 |
79 |
80 | 81 |
82 | 83 |
84 |
85 |
86 | 87 |
88 | 89 |
90 |
91 |
92 |
93 | 94 |
95 |
96 |
97 | 111 | 112 | -------------------------------------------------------------------------------- /PHPMailer/examples/scripts/shLegacy.js: -------------------------------------------------------------------------------- 1 | var dp = { 2 | SyntaxHighlighter : {} 3 | }; 4 | 5 | dp.SyntaxHighlighter = { 6 | parseParams: function( 7 | input, 8 | showGutter, 9 | showControls, 10 | collapseAll, 11 | firstLine, 12 | showColumns 13 | ) 14 | { 15 | function getValue(list, name) 16 | { 17 | var regex = new XRegExp('^' + name + '\\[(?\\w+)\\]$', 'gi'), 18 | match = null 19 | ; 20 | 21 | for (var i = 0; i < list.length; i++) 22 | if ((match = regex.exec(list[i])) != null) 23 | return match.value; 24 | 25 | return null; 26 | } 27 | 28 | function defaultValue(value, def) 29 | { 30 | return value != null ? value : def; 31 | } 32 | 33 | function asString(value) 34 | { 35 | return value != null ? value.toString() : null; 36 | } 37 | 38 | var parts = input.split(':'), 39 | brushName = parts[0], 40 | options = {}, 41 | straight = { 'true' : true }, 42 | reverse = { 'true' : false }, 43 | defaults = SyntaxHighlighter.defaults 44 | ; 45 | 46 | for (var i in parts) 47 | options[parts[i]] = 'true'; 48 | 49 | showGutter = asString(defaultValue(showGutter, defaults.gutter)); 50 | showControls = asString(defaultValue(showControls, defaults.toolbar)); 51 | collapseAll = asString(defaultValue(collapseAll, defaults.collapse)); 52 | showColumns = asString(defaultValue(showColumns, defaults.ruler)); 53 | firstLine = asString(defaultValue(firstLine, defaults['first-line'])); 54 | 55 | return { 56 | brush : brushName, 57 | gutter : defaultValue(reverse[options.nogutter], showGutter), 58 | toolbar : defaultValue(reverse[options.nocontrols], showControls), 59 | collapse : defaultValue(straight[options.collapse], collapseAll), 60 | // ruler : defaultValue(straight[options.showcolumns], showColumns), 61 | 'first-line' : defaultValue(getValue(parts, 'firstline'), firstLine) 62 | }; 63 | }, 64 | 65 | HighlightAll: function( 66 | name, 67 | showGutter /* optional */, 68 | showControls /* optional */, 69 | collapseAll /* optional */, 70 | firstLine /* optional */, 71 | showColumns /* optional */ 72 | ) 73 | { 74 | function findValue() 75 | { 76 | var a = arguments; 77 | 78 | for (var i = 0; i < a.length; i++) 79 | { 80 | if (a[i] === null) 81 | continue; 82 | 83 | if (typeof(a[i]) == 'string' && a[i] != '') 84 | return a[i] + ''; 85 | 86 | if (typeof(a[i]) == 'object' && a[i].value != '') 87 | return a[i].value + ''; 88 | } 89 | 90 | return null; 91 | } 92 | 93 | function findTagsByName(list, name, tagName) 94 | { 95 | var tags = document.getElementsByTagName(tagName); 96 | 97 | for (var i = 0; i < tags.length; i++) 98 | if (tags[i].getAttribute('name') == name) 99 | list.push(tags[i]); 100 | } 101 | 102 | var elements = [], 103 | highlighter = null, 104 | registered = {}, 105 | propertyName = 'innerHTML' 106 | ; 107 | 108 | // for some reason IE doesn't find
 by name, however it does see them just fine by tag name... 
109 | 		findTagsByName(elements, name, 'pre');
110 | 		findTagsByName(elements, name, 'textarea');
111 | 
112 | 		if (elements.length === 0)
113 | 			return;
114 | 		
115 | 		for (var i = 0; i < elements.length; i++)
116 | 		{
117 | 			var element = elements[i],
118 | 				params = findValue(
119 | 					element.attributes['class'], element.className, 
120 | 					element.attributes['language'], element.language
121 | 					),
122 | 				language = ''
123 | 				;
124 | 			
125 | 			if (params === null) 
126 | 				continue;
127 | 
128 | 			params = dp.SyntaxHighlighter.parseParams(
129 | 				params,
130 | 				showGutter, 
131 | 				showControls, 
132 | 				collapseAll, 
133 | 				firstLine, 
134 | 				showColumns
135 | 				);
136 | 
137 | 			SyntaxHighlighter.highlight(params, element);
138 | 		}
139 | 	}
140 | };
141 | 


--------------------------------------------------------------------------------
/PHPMailer/examples/signed-mail.phps:
--------------------------------------------------------------------------------
 1 | setFrom('from@example.com', 'First Last');
55 | //Set an alternative reply-to address
56 | $mail->addReplyTo('replyto@example.com', 'First Last');
57 | //Set who the message is to be sent to
58 | $mail->addAddress('whoto@example.com', 'John Doe');
59 | //Set the subject line
60 | $mail->Subject = 'PHPMailer mail() test';
61 | //Read an HTML message body from an external file, convert referenced images to embedded,
62 | //Convert HTML into a basic plain-text alternative body
63 | $mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__));
64 | //Replace the plain text body with one created manually
65 | $mail->AltBody = 'This is a plain-text message body';
66 | //Attach an image file
67 | $mail->addAttachment('images/phpmailer_mini.png');
68 | 
69 | //Configure message signing (the actual signing does not occur until sending)
70 | $mail->sign(
71 |     '/path/to/cert.crt', //The location of your certificate file
72 |     '/path/to/cert.key', //The location of your private key file
73 |     'yourSecretPrivateKeyPassword', //The password you protected your private key with (not the Import Password! may be empty but parameter must not be omitted!)
74 |     '/path/to/certchain.pem' //The location of your chain file
75 | );
76 | 
77 | //Send the message, check for errors
78 | if (!$mail->send()) {
79 |     echo "Mailer Error: " . $mail->ErrorInfo;
80 | } else {
81 |     echo "Message sent!";
82 | }
83 | 
84 | /**
85 |  * REMARKS:
86 |  * If your email client does not support S/MIME it will most likely just show an attachment smime.p7s which is the signature contained in the email.
87 |  * Other clients, such as Thunderbird support S/MIME natively and will validate the signature automatically and report the result in some way.
88 |  */
89 | ?>
90 | 


--------------------------------------------------------------------------------
/PHPMailer/extras/EasyPeasyICS.php:
--------------------------------------------------------------------------------
  1 | 
  5 |  * @author Manuel Reinhard 
  6 |  *
  7 |  * Built with inspiration from
  8 |  * http://stackoverflow.com/questions/1463480/how-can-i-use-php-to-dynamically-publish-an-ical-file-to-be-read-by-google-calend/1464355#1464355
  9 |  * History:
 10 |  * 2010/12/17 - Manuel Reinhard - when it all started
 11 |  * 2014 PHPMailer project becomes maintainer
 12 |  */
 13 | 
 14 | /**
 15 |  * Class EasyPeasyICS.
 16 |  * Simple ICS data generator
 17 |  * @package phpmailer
 18 |  * @subpackage easypeasyics
 19 |  */
 20 | class EasyPeasyICS
 21 | {
 22 |     /**
 23 |      * The name of the calendar
 24 |      * @var string
 25 |      */
 26 |     protected $calendarName;
 27 |     /**
 28 |      * The array of events to add to this calendar
 29 |      * @var array
 30 |      */
 31 |     protected $events = array();
 32 | 
 33 |     /**
 34 |      * Constructor
 35 |      * @param string $calendarName
 36 |      */
 37 |     public function __construct($calendarName = "")
 38 |     {
 39 |         $this->calendarName = $calendarName;
 40 |     }
 41 | 
 42 |     /**
 43 |      * Add an event to this calendar.
 44 |      * @param string $start The start date and time as a unix timestamp
 45 |      * @param string $end The end date and time as a unix timestamp
 46 |      * @param string $summary A summary or title for the event
 47 |      * @param string $description A description of the event
 48 |      * @param string $url A URL for the event
 49 |      * @param string $uid A unique identifier for the event - generated automatically if not provided
 50 |      * @return array An array of event details, including any generated UID
 51 |      */
 52 |     public function addEvent($start, $end, $summary = '', $description = '', $url = '', $uid = '')
 53 |     {
 54 |         if (empty($uid)) {
 55 |             $uid = md5(uniqid(mt_rand(), true)) . '@EasyPeasyICS';
 56 |         }
 57 |         $event = array(
 58 |             'start' => gmdate('Ymd', $start) . 'T' . gmdate('His', $start) . 'Z',
 59 |             'end' => gmdate('Ymd', $end) . 'T' . gmdate('His', $end) . 'Z',
 60 |             'summary' => $summary,
 61 |             'description' => $description,
 62 |             'url' => $url,
 63 |             'uid' => $uid
 64 |         );
 65 |         $this->events[] = $event;
 66 |         return $event;
 67 |     }
 68 | 
 69 |     /**
 70 |      * @return array Get the array of events.
 71 |      */
 72 |     public function getEvents()
 73 |     {
 74 |         return $this->events;
 75 |     }
 76 | 
 77 |     /**
 78 |      * Clear all events.
 79 |      */
 80 |     public function clearEvents()
 81 |     {
 82 |         $this->events = array();
 83 |     }
 84 | 
 85 |     /**
 86 |      * Get the name of the calendar.
 87 |      * @return string
 88 |      */
 89 |     public function getName()
 90 |     {
 91 |         return $this->calendarName;
 92 |     }
 93 | 
 94 |     /**
 95 |      * Set the name of the calendar.
 96 |      * @param $name
 97 |      */
 98 |     public function setName($name)
 99 |     {
100 |         $this->calendarName = $name;
101 |     }
102 | 
103 |     /**
104 |      * Render and optionally output a vcal string.
105 |      * @param bool $output Whether to output the calendar data directly (the default).
106 |      * @return string The complete rendered vlal
107 |      */
108 |     public function render($output = true)
109 |     {
110 |         //Add header
111 |         $ics = 'BEGIN:VCALENDAR
112 | METHOD:PUBLISH
113 | VERSION:2.0
114 | X-WR-CALNAME:' . $this->calendarName . '
115 | PRODID:-//hacksw/handcal//NONSGML v1.0//EN';
116 | 
117 |         //Add events
118 |         foreach ($this->events as $event) {
119 |             $ics .= '
120 | BEGIN:VEVENT
121 | UID:' . $event['uid'] . '
122 | DTSTAMP:' . gmdate('Ymd') . 'T' . gmdate('His') . 'Z
123 | DTSTART:' . $event['start'] . '
124 | DTEND:' . $event['end'] . '
125 | SUMMARY:' . str_replace("\n", "\\n", $event['summary']) . '
126 | DESCRIPTION:' . str_replace("\n", "\\n", $event['description']) . '
127 | URL;VALUE=URI:' . $event['url'] . '
128 | END:VEVENT';
129 |         }
130 | 
131 |         //Add footer
132 |         $ics .= '
133 | END:VCALENDAR';
134 | 
135 |         if ($output) {
136 |             //Output
137 |             $filename = $this->calendarName;
138 |             //Filename needs quoting if it contains spaces
139 |             if (strpos($filename, ' ') !== false) {
140 |                 $filename = '"'.$filename.'"';
141 |             }
142 |             header('Content-type: text/calendar; charset=utf-8');
143 |             header('Content-Disposition: inline; filename=' . $filename . '.ics');
144 |             echo $ics;
145 |         }
146 |         return $ics;
147 |     }
148 | }
149 | 


--------------------------------------------------------------------------------
/PHPMailer/examples/scripts/shBrushPhp.js:
--------------------------------------------------------------------------------
 1 | ;(function()
 2 | {
 3 | 	// CommonJS
 4 | 	SyntaxHighlighter = SyntaxHighlighter || (typeof require !== 'undefined'? require('shCore').SyntaxHighlighter : null);
 5 | 
 6 | 	function Brush()
 7 | 	{
 8 | 		var funcs	=	'abs acos acosh addcslashes addslashes ' +
 9 | 						'array_change_key_case array_chunk array_combine array_count_values array_diff '+
10 | 						'array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_fill '+
11 | 						'array_filter array_flip array_intersect array_intersect_assoc array_intersect_key '+
12 | 						'array_intersect_uassoc array_intersect_ukey array_key_exists array_keys array_map '+
13 | 						'array_merge array_merge_recursive array_multisort array_pad array_pop array_product '+
14 | 						'array_push array_rand array_reduce array_reverse array_search array_shift '+
15 | 						'array_slice array_splice array_sum array_udiff array_udiff_assoc '+
16 | 						'array_udiff_uassoc array_uintersect array_uintersect_assoc '+
17 | 						'array_uintersect_uassoc array_unique array_unshift array_values array_walk '+
18 | 						'array_walk_recursive atan atan2 atanh base64_decode base64_encode base_convert '+
19 | 						'basename bcadd bccomp bcdiv bcmod bcmul bindec bindtextdomain bzclose bzcompress '+
20 | 						'bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite ceil chdir '+
21 | 						'checkdate checkdnsrr chgrp chmod chop chown chr chroot chunk_split class_exists '+
22 | 						'closedir closelog copy cos cosh count count_chars date decbin dechex decoct '+
23 | 						'deg2rad delete ebcdic2ascii echo empty end ereg ereg_replace eregi eregi_replace error_log '+
24 | 						'error_reporting escapeshellarg escapeshellcmd eval exec exit exp explode extension_loaded '+
25 | 						'feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents '+
26 | 						'fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype '+
27 | 						'floatval flock floor flush fmod fnmatch fopen fpassthru fprintf fputcsv fputs fread fscanf '+
28 | 						'fseek fsockopen fstat ftell ftok getallheaders getcwd getdate getenv gethostbyaddr gethostbyname '+
29 | 						'gethostbynamel getimagesize getlastmod getmxrr getmygid getmyinode getmypid getmyuid getopt '+
30 | 						'getprotobyname getprotobynumber getrandmax getrusage getservbyname getservbyport gettext '+
31 | 						'gettimeofday gettype glob gmdate gmmktime ini_alter ini_get ini_get_all ini_restore ini_set '+
32 | 						'interface_exists intval ip2long is_a is_array is_bool is_callable is_dir is_double '+
33 | 						'is_executable is_file is_finite is_float is_infinite is_int is_integer is_link is_long '+
34 | 						'is_nan is_null is_numeric is_object is_readable is_real is_resource is_scalar is_soap_fault '+
35 | 						'is_string is_subclass_of is_uploaded_file is_writable is_writeable mkdir mktime nl2br '+
36 | 						'parse_ini_file parse_str parse_url passthru pathinfo print readlink realpath rewind rewinddir rmdir '+
37 | 						'round str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split '+
38 | 						'str_word_count strcasecmp strchr strcmp strcoll strcspn strftime strip_tags stripcslashes '+
39 | 						'stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpbrk '+
40 | 						'strpos strptime strrchr strrev strripos strrpos strspn strstr strtok strtolower strtotime '+
41 | 						'strtoupper strtr strval substr substr_compare';
42 | 
43 | 		var keywords =	'abstract and array as break case catch cfunction class clone const continue declare default die do ' +
44 | 						'else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach ' +
45 | 						'function global goto if implements include include_once interface instanceof insteadof namespace new ' +
46 | 						'old_function or private protected public return require require_once static switch ' +
47 | 						'trait throw try use var while xor ';
48 | 		
49 | 		var constants	= '__FILE__ __LINE__ __METHOD__ __FUNCTION__ __CLASS__';
50 | 
51 | 		this.regexList = [
52 | 			{ regex: SyntaxHighlighter.regexLib.singleLineCComments,	css: 'comments' },			// one line comments
53 | 			{ regex: SyntaxHighlighter.regexLib.multiLineCComments,		css: 'comments' },			// multiline comments
54 | 			{ regex: SyntaxHighlighter.regexLib.doubleQuotedString,		css: 'string' },			// double quoted strings
55 | 			{ regex: SyntaxHighlighter.regexLib.singleQuotedString,		css: 'string' },			// single quoted strings
56 | 			{ regex: /\$\w+/g,											css: 'variable' },			// variables
57 | 			{ regex: new RegExp(this.getKeywords(funcs), 'gmi'),		css: 'functions' },			// common functions
58 | 			{ regex: new RegExp(this.getKeywords(constants), 'gmi'),	css: 'constants' },			// constants
59 | 			{ regex: new RegExp(this.getKeywords(keywords), 'gm'),		css: 'keyword' }			// keyword
60 | 			];
61 | 
62 | 		this.forHtmlScript(SyntaxHighlighter.regexLib.phpScriptTags);
63 | 	};
64 | 
65 | 	Brush.prototype	= new SyntaxHighlighter.Highlighter();
66 | 	Brush.aliases	= ['php'];
67 | 
68 | 	SyntaxHighlighter.brushes.Php = Brush;
69 | 
70 | 	// CommonJS
71 | 	typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
72 | })();
73 | 


--------------------------------------------------------------------------------
/PHPMailer/examples/styles/shCore.css:
--------------------------------------------------------------------------------
 1 | .syntaxhighlighter a,.syntaxhighlighter div,.syntaxhighlighter code,.syntaxhighlighter table,.syntaxhighlighter table td,.syntaxhighlighter table tr,.syntaxhighlighter table tbody,.syntaxhighlighter table thead,.syntaxhighlighter table caption,.syntaxhighlighter textarea{-moz-border-radius:0 0 0 0 !important;-webkit-border-radius:0 0 0 0 !important;background:none !important;border:0 !important;bottom:auto !important;float:none !important;height:auto !important;left:auto !important;line-height:1.1em !important;margin:0 !important;outline:0 !important;overflow:visible !important;padding:0 !important;position:static !important;right:auto !important;text-align:left !important;top:auto !important;vertical-align:baseline !important;width:auto !important;box-sizing:content-box !important;font-family:"Consolas","Bitstream Vera Sans Mono","Courier New",Courier,monospace !important;font-weight:normal !important;font-style:normal !important;font-size:1em !important;min-height:inherit !important;min-height:auto !important;}
 2 | .syntaxhighlighter{width:100% !important;margin:1em 0 1em 0 !important;position:relative !important;overflow:auto !important;font-size:1em !important;}
 3 | .syntaxhighlighter.source{overflow:hidden !important;}
 4 | .syntaxhighlighter .bold{font-weight:bold !important;}
 5 | .syntaxhighlighter .italic{font-style:italic !important;}
 6 | .syntaxhighlighter .line{white-space:pre !important;}
 7 | .syntaxhighlighter table{width:100% !important;}
 8 | .syntaxhighlighter table caption{text-align:left !important;padding:.5em 0 0.5em 1em !important;}
 9 | .syntaxhighlighter table td.code{width:100% !important;}
10 | .syntaxhighlighter table td.code .container{position:relative !important;}
11 | .syntaxhighlighter table td.code .container textarea{box-sizing:border-box !important;position:absolute !important;left:0 !important;top:0 !important;width:100% !important;height:100% !important;border:none !important;background:white !important;padding-left:1em !important;overflow:hidden !important;white-space:pre !important;}
12 | .syntaxhighlighter table td.gutter .line{text-align:right !important;padding:0 0.5em 0 1em !important;}
13 | .syntaxhighlighter table td.code .line{padding:0 1em !important;}
14 | .syntaxhighlighter.nogutter td.code .container textarea,.syntaxhighlighter.nogutter td.code .line{padding-left:0em !important;}
15 | .syntaxhighlighter.show{display:block !important;}
16 | .syntaxhighlighter.collapsed table{display:none !important;}
17 | .syntaxhighlighter.collapsed .toolbar{padding:0.1em 0.8em 0em 0.8em !important;font-size:1em !important;position:static !important;width:auto !important;height:auto !important;}
18 | .syntaxhighlighter.collapsed .toolbar span{display:inline !important;margin-right:1em !important;}
19 | .syntaxhighlighter.collapsed .toolbar span a{padding:0 !important;display:none !important;}
20 | .syntaxhighlighter.collapsed .toolbar span a.expandSource{display:inline !important;}
21 | .syntaxhighlighter .toolbar{position:absolute !important;right:1px !important;top:1px !important;width:11px !important;height:11px !important;font-size:10px !important;z-index:10 !important;}
22 | .syntaxhighlighter .toolbar span.title{display:inline !important;}
23 | .syntaxhighlighter .toolbar a{display:block !important;text-align:center !important;text-decoration:none !important;padding-top:1px !important;}
24 | .syntaxhighlighter .toolbar a.expandSource{display:none !important;}
25 | .syntaxhighlighter.ie{font-size:.9em !important;padding:1px 0 1px 0 !important;}
26 | .syntaxhighlighter.ie .toolbar{line-height:8px !important;}
27 | .syntaxhighlighter.ie .toolbar a{padding-top:0px !important;}
28 | .syntaxhighlighter.printing .line.alt1 .content,.syntaxhighlighter.printing .line.alt2 .content,.syntaxhighlighter.printing .line.highlighted .number,.syntaxhighlighter.printing .line.highlighted.alt1 .content,.syntaxhighlighter.printing .line.highlighted.alt2 .content{background:none !important;}
29 | .syntaxhighlighter.printing .line .number{color:#bbbbbb !important;}
30 | .syntaxhighlighter.printing .line .content{color:black !important;}
31 | .syntaxhighlighter.printing .toolbar{display:none !important;}
32 | .syntaxhighlighter.printing a{text-decoration:none !important;}
33 | .syntaxhighlighter.printing .plain,.syntaxhighlighter.printing .plain a{color:black !important;}
34 | .syntaxhighlighter.printing .comments,.syntaxhighlighter.printing .comments a{color:#008200 !important;}
35 | .syntaxhighlighter.printing .string,.syntaxhighlighter.printing .string a{color:blue !important;}
36 | .syntaxhighlighter.printing .keyword{color:#006699 !important;font-weight:bold !important;}
37 | .syntaxhighlighter.printing .preprocessor{color:gray !important;}
38 | .syntaxhighlighter.printing .variable{color:#aa7700 !important;}
39 | .syntaxhighlighter.printing .value{color:#009900 !important;}
40 | .syntaxhighlighter.printing .functions{color:#ff1493 !important;}
41 | .syntaxhighlighter.printing .constants{color:#0066cc !important;}
42 | .syntaxhighlighter.printing .script{font-weight:bold !important;}
43 | .syntaxhighlighter.printing .color1,.syntaxhighlighter.printing .color1 a{color:gray !important;}
44 | .syntaxhighlighter.printing .color2,.syntaxhighlighter.printing .color2 a{color:#ff1493 !important;}
45 | .syntaxhighlighter.printing .color3,.syntaxhighlighter.printing .color3 a{color:red !important;}
46 | .syntaxhighlighter.printing .break,.syntaxhighlighter.printing .break a{color:black !important;}
47 | 


--------------------------------------------------------------------------------
/PHPMailer/get_oauth_token.php:
--------------------------------------------------------------------------------
  1 | //get_oauth_token.php
  6 |  * e.g.: http://localhost/phpmail/get_oauth_token.php
  7 |  * * Ensure dependencies are installed with 'composer install'
  8 |  * * Set up an app in your Google developer console
  9 |  * * Set the script address as the app's redirect URL
 10 |  * If no refresh token is obtained when running this file, revoke access to your app
 11 |  * using link: https://accounts.google.com/b/0/IssuedAuthSubTokens and run the script again.
 12 |  * This script requires PHP 5.4 or later
 13 |  * PHP Version 5.4
 14 |  */
 15 | 
 16 | namespace League\OAuth2\Client\Provider;
 17 | 
 18 | require 'vendor/autoload.php';
 19 | 
 20 | use League\OAuth2\Client\Provider\Exception\IdentityProviderException;
 21 | use League\OAuth2\Client\Token\AccessToken;
 22 | use League\OAuth2\Client\Tool\BearerAuthorizationTrait;
 23 | use Psr\Http\Message\ResponseInterface;
 24 | 
 25 | session_start();
 26 | 
 27 | //If this automatic URL doesn't work, set it yourself manually
 28 | $redirectUri = isset($_SERVER['HTTPS']) ? 'https://' : 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
 29 | //$redirectUri = 'http://localhost/phpmailer/get_oauth_token.php';
 30 | 
 31 | //These details obtained are by setting up app in Google developer console.
 32 | $clientId = 'RANDOMCHARS-----duv1n2.apps.googleusercontent.com';
 33 | $clientSecret = 'RANDOMCHARS-----lGyjPcRtvP';
 34 | 
 35 | class Google extends AbstractProvider
 36 | {
 37 |     use BearerAuthorizationTrait;
 38 | 
 39 |     const ACCESS_TOKEN_RESOURCE_OWNER_ID = 'id';
 40 | 
 41 |     /**
 42 |      * @var string If set, this will be sent to google as the "access_type" parameter.
 43 |      * @link https://developers.google.com/accounts/docs/OAuth2WebServer#offline
 44 |      */
 45 |     protected $accessType;
 46 | 
 47 |     /**
 48 |      * @var string If set, this will be sent to google as the "hd" parameter.
 49 |      * @link https://developers.google.com/accounts/docs/OAuth2Login#hd-param
 50 |      */
 51 |     protected $hostedDomain;
 52 | 
 53 |     /**
 54 |      * @var string If set, this will be sent to google as the "scope" parameter.
 55 |      * @link https://developers.google.com/gmail/api/auth/scopes
 56 |      */
 57 |     protected $scope;
 58 | 
 59 |     public function getBaseAuthorizationUrl()
 60 |     {
 61 |         return 'https://accounts.google.com/o/oauth2/auth';
 62 |     }
 63 | 
 64 |     public function getBaseAccessTokenUrl(array $params)
 65 |     {
 66 |         return 'https://accounts.google.com/o/oauth2/token';
 67 |     }
 68 | 
 69 |     public function getResourceOwnerDetailsUrl(AccessToken $token)
 70 |     {
 71 | 	return ' ';
 72 |     }
 73 | 
 74 |     protected function getAuthorizationParameters(array $options)
 75 |     {
 76 | 	if (is_array($this->scope)) {
 77 |             $separator = $this->getScopeSeparator();
 78 |             $this->scope = implode($separator, $this->scope);
 79 |         }
 80 | 
 81 |         $params = array_merge(
 82 |             parent::getAuthorizationParameters($options),
 83 |             array_filter([
 84 |                 'hd'          => $this->hostedDomain,
 85 |                 'access_type' => $this->accessType,
 86 | 		'scope'       => $this->scope,
 87 |                 // if the user is logged in with more than one account ask which one to use for the login!
 88 |                 'authuser'    => '-1'
 89 |             ])
 90 |         );
 91 |         return $params;
 92 |     }
 93 | 
 94 |     protected function getDefaultScopes()
 95 |     {
 96 |         return [
 97 |             'email',
 98 |             'openid',
 99 |             'profile',
100 |         ];
101 |     }
102 | 
103 |     protected function getScopeSeparator()
104 |     {
105 |         return ' ';
106 |     }
107 | 
108 |     protected function checkResponse(ResponseInterface $response, $data)
109 |     {
110 |         if (!empty($data['error'])) {
111 |             $code  = 0;
112 |             $error = $data['error'];
113 | 
114 |             if (is_array($error)) {
115 |                 $code  = $error['code'];
116 |                 $error = $error['message'];
117 |             }
118 | 
119 |             throw new IdentityProviderException($error, $code, $data);
120 |         }
121 |     }
122 | 
123 |     protected function createResourceOwner(array $response, AccessToken $token)
124 |     {
125 |         return new GoogleUser($response);
126 |     }
127 | }
128 | 
129 | 
130 | //Set Redirect URI in Developer Console as [https/http]:////get_oauth_token.php
131 | $provider = new Google(
132 |     array(
133 |         'clientId' => $clientId,
134 |         'clientSecret' => $clientSecret,
135 |         'redirectUri' => $redirectUri,
136 |         'scope' => array('https://mail.google.com/'),
137 | 	'accessType' => 'offline'
138 |     )
139 | );
140 | 
141 | if (!isset($_GET['code'])) {
142 |     // If we don't have an authorization code then get one
143 |     $authUrl = $provider->getAuthorizationUrl();
144 |     $_SESSION['oauth2state'] = $provider->getState();
145 |     header('Location: ' . $authUrl);
146 |     exit;
147 | // Check given state against previously stored one to mitigate CSRF attack
148 | } elseif (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['oauth2state'])) {
149 |     unset($_SESSION['oauth2state']);
150 |     exit('Invalid state');
151 | } else {
152 |     // Try to get an access token (using the authorization code grant)
153 |     $token = $provider->getAccessToken(
154 |         'authorization_code',
155 |         array(
156 |             'code' => $_GET['code']
157 |         )
158 |     );
159 | 
160 |     // Use this to get a new access token if the old one expires
161 |     echo 'Refresh Token: ' . $token->getRefreshToken();
162 | }
163 | 


--------------------------------------------------------------------------------
/PHPMailer/examples/index.html:
--------------------------------------------------------------------------------
 1 | 
 2 | 
 3 | 
 4 | 	
 5 | 	PHPMailer Examples
 6 | 
 7 | 
 8 | 

PHPMailer code examplesPHPMailer logo

9 |

This folder contains a collection of examples of using PHPMailer.

10 |

About testing email sending

11 |

When working on email sending code you'll find yourself worrying about what might happen if all these test emails got sent to your mailing list. The solution is to use a fake mail server, one that acts just like the real thing, but just doesn't actually send anything out. Some offer web interfaces, feedback, logging, the ability to return specific error codes, all things that are useful for testing error handling, authentication etc. Here's a selection of mail testing tools you might like to try:

12 |
    13 |
  • FakeSMTP, a Java desktop app with the ability to show an SMTP log and save messages to a folder.
  • 14 |
  • FakeEmail, a Python-based fake mail server with a web interface.
  • 15 |
  • smtp-sink, part of the Postfix mail server, so you probably already have this installed. This is used in the Travis-CI configuration to run PHPMailer's unit tests.
  • 16 |
  • smtp4dev, a dummy SMTP server for Windows.
  • 17 |
  • fakesendmail.sh, part of PHPMailer's test setup, this is a shell script that emulates sendmail for testing 'mail' or 'sendmail' methods in PHPMailer.
  • 18 |
  • msglint, not a mail server, the IETF's MIME structure analyser checks the formatting of your messages.
  • 19 |
20 |
21 |

Security note

22 |

Before running these examples you'll need to rename them with '.php' extensions. They are supplied as '.phps' files which will usually be displayed with syntax highlighting by PHP instead of running them. This prevents potential security issues with running potential spam-gateway code if you happen to deploy these code examples on a live site - please don't do that! Similarly, don't leave your passwords in these files as they will be visible to the world!

23 |
24 |

code_generator.phps

25 |

This script is a simple code generator - fill in the form and hit submit, and it will use when you entered to email you a message, and will also generate PHP code using your settings that you can copy and paste to use in your own apps. If you need to get going quickly, this is probably the best place to start.

26 |

mail.phps

27 |

This script is a basic example which creates an email message from an external HTML file, creates a plain text body, sets various addresses, adds an attachment and sends the message. It uses PHP's built-in mail() function which is the simplest to use, but relies on the presence of a local mail server, something which is not usually available on Windows. If you find yourself in that situation, either install a local mail server, or use a remote one and send using SMTP instead.

28 |

exceptions.phps

29 |

The same as the mail example, but shows how to use PHPMailer's optional exceptions for error handling.

30 |

smtp.phps

31 |

A simple example sending using SMTP with authentication.

32 |

smtp_no_auth.phps

33 |

A simple example sending using SMTP without authentication.

34 |

sendmail.phps

35 |

A simple example using sendmail. Sendmail is a program (usually found on Linux/BSD, OS X and other UNIX-alikes) that can be used to submit messages to a local mail server without a lengthy SMTP conversation. It's probably the fastest sending mechanism, but lacks some error reporting features. There are sendmail emulators for most popular mail servers including postfix, qmail, exim etc.

36 |

gmail.phps

37 |

Submitting email via Google's Gmail service is a popular use of PHPMailer. It's much the same as normal SMTP sending, just with some specific settings, namely using TLS encryption, authentication is enabled, and it connects to the SMTP submission port 587 on the smtp.gmail.com host. This example does all that.

38 |

pop_before_smtp.phps

39 |

Before effective SMTP authentication mechanisms were available, it was common for ISPs to use POP-before-SMTP authentication. As it implies, you authenticate using the POP3 protocol (an older protocol now mostly replaced by the far superior IMAP), and then the SMTP server will allow send access from your IP address for a short while, usually 5-15 minutes. PHPMailer includes a POP3 protocol client, so it can carry out this sequence - it's just like a normal SMTP conversation (without authentication), but connects via POP first.

40 |

mailing_list.phps

41 |

This is a somewhat naïve example of sending similar emails to a list of different addresses. It sets up a PHPMailer instance using SMTP, then connects to a MySQL database to retrieve a list of recipients. The code loops over this list, sending email to each person using their info and marks them as sent in the database. It makes use of SMTP keepalive which saves reconnecting and re-authenticating between each message.

42 |
43 |

smtp_check.phps

44 |

This is an example showing how to use the SMTP class by itself (without PHPMailer) to check an SMTP connection.

45 |
46 |

Most of these examples use the 'example.com' domain. This domain is reserved by IANA for illustrative purposes, as documented in RFC 2606. Don't use made-up domains like 'mydomain.com' or 'somedomain.com' in examples as someone, somewhere, probably owns them!

47 | 48 | 49 | -------------------------------------------------------------------------------- /PHPMailer/extras/ntlm_sasl_client.php: -------------------------------------------------------------------------------- 1 | "mcrypt", 28 | "mhash" => "mhash" 29 | ); 30 | $client->error = "the extension " . $extensions[$function] . 31 | " required by the NTLM SASL client class is not available in this PHP configuration"; 32 | return (0); 33 | } 34 | return (1); 35 | } 36 | 37 | public function ASCIIToUnicode($ascii) 38 | { 39 | for ($unicode = "", $a = 0; $a < strlen($ascii); $a++) { 40 | $unicode .= substr($ascii, $a, 1) . chr(0); 41 | } 42 | return ($unicode); 43 | } 44 | 45 | public function typeMsg1($domain, $workstation) 46 | { 47 | $domain_length = strlen($domain); 48 | $workstation_length = strlen($workstation); 49 | $workstation_offset = 32; 50 | $domain_offset = $workstation_offset + $workstation_length; 51 | return ( 52 | "NTLMSSP\0" . 53 | "\x01\x00\x00\x00" . 54 | "\x07\x32\x00\x00" . 55 | pack("v", $domain_length) . 56 | pack("v", $domain_length) . 57 | pack("V", $domain_offset) . 58 | pack("v", $workstation_length) . 59 | pack("v", $workstation_length) . 60 | pack("V", $workstation_offset) . 61 | $workstation . 62 | $domain 63 | ); 64 | } 65 | 66 | public function NTLMResponse($challenge, $password) 67 | { 68 | $unicode = $this->ASCIIToUnicode($password); 69 | $md4 = mhash(MHASH_MD4, $unicode); 70 | $padded = $md4 . str_repeat(chr(0), 21 - strlen($md4)); 71 | $iv_size = mcrypt_get_iv_size(MCRYPT_DES, MCRYPT_MODE_ECB); 72 | $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); 73 | for ($response = "", $third = 0; $third < 21; $third += 7) { 74 | for ($packed = "", $p = $third; $p < $third + 7; $p++) { 75 | $packed .= str_pad(decbin(ord(substr($padded, $p, 1))), 8, "0", STR_PAD_LEFT); 76 | } 77 | for ($key = "", $p = 0; $p < strlen($packed); $p += 7) { 78 | $s = substr($packed, $p, 7); 79 | $b = $s . ((substr_count($s, "1") % 2) ? "0" : "1"); 80 | $key .= chr(bindec($b)); 81 | } 82 | $ciphertext = mcrypt_encrypt(MCRYPT_DES, $key, $challenge, MCRYPT_MODE_ECB, $iv); 83 | $response .= $ciphertext; 84 | } 85 | return $response; 86 | } 87 | 88 | public function typeMsg3($ntlm_response, $user, $domain, $workstation) 89 | { 90 | $domain_unicode = $this->ASCIIToUnicode($domain); 91 | $domain_length = strlen($domain_unicode); 92 | $domain_offset = 64; 93 | $user_unicode = $this->ASCIIToUnicode($user); 94 | $user_length = strlen($user_unicode); 95 | $user_offset = $domain_offset + $domain_length; 96 | $workstation_unicode = $this->ASCIIToUnicode($workstation); 97 | $workstation_length = strlen($workstation_unicode); 98 | $workstation_offset = $user_offset + $user_length; 99 | $lm = ""; 100 | $lm_length = strlen($lm); 101 | $lm_offset = $workstation_offset + $workstation_length; 102 | $ntlm = $ntlm_response; 103 | $ntlm_length = strlen($ntlm); 104 | $ntlm_offset = $lm_offset + $lm_length; 105 | $session = ""; 106 | $session_length = strlen($session); 107 | $session_offset = $ntlm_offset + $ntlm_length; 108 | return ( 109 | "NTLMSSP\0" . 110 | "\x03\x00\x00\x00" . 111 | pack("v", $lm_length) . 112 | pack("v", $lm_length) . 113 | pack("V", $lm_offset) . 114 | pack("v", $ntlm_length) . 115 | pack("v", $ntlm_length) . 116 | pack("V", $ntlm_offset) . 117 | pack("v", $domain_length) . 118 | pack("v", $domain_length) . 119 | pack("V", $domain_offset) . 120 | pack("v", $user_length) . 121 | pack("v", $user_length) . 122 | pack("V", $user_offset) . 123 | pack("v", $workstation_length) . 124 | pack("v", $workstation_length) . 125 | pack("V", $workstation_offset) . 126 | pack("v", $session_length) . 127 | pack("v", $session_length) . 128 | pack("V", $session_offset) . 129 | "\x01\x02\x00\x00" . 130 | $domain_unicode . 131 | $user_unicode . 132 | $workstation_unicode . 133 | $lm . 134 | $ntlm 135 | ); 136 | } 137 | 138 | public function start(&$client, &$message, &$interactions) 139 | { 140 | if ($this->state != SASL_NTLM_STATE_START) { 141 | $client->error = "NTLM authentication state is not at the start"; 142 | return (SASL_FAIL); 143 | } 144 | $this->credentials = array( 145 | "user" => "", 146 | "password" => "", 147 | "realm" => "", 148 | "workstation" => "" 149 | ); 150 | $defaults = array(); 151 | $status = $client->GetCredentials($this->credentials, $defaults, $interactions); 152 | if ($status == SASL_CONTINUE) { 153 | $this->state = SASL_NTLM_STATE_IDENTIFY_DOMAIN; 154 | } 155 | unset($message); 156 | return ($status); 157 | } 158 | 159 | public function step(&$client, $response, &$message, &$interactions) 160 | { 161 | switch ($this->state) { 162 | case SASL_NTLM_STATE_IDENTIFY_DOMAIN: 163 | $message = $this->typeMsg1($this->credentials["realm"], $this->credentials["workstation"]); 164 | $this->state = SASL_NTLM_STATE_RESPOND_CHALLENGE; 165 | break; 166 | case SASL_NTLM_STATE_RESPOND_CHALLENGE: 167 | $ntlm_response = $this->NTLMResponse(substr($response, 24, 8), $this->credentials["password"]); 168 | $message = $this->typeMsg3( 169 | $ntlm_response, 170 | $this->credentials["user"], 171 | $this->credentials["realm"], 172 | $this->credentials["workstation"] 173 | ); 174 | $this->state = SASL_NTLM_STATE_DONE; 175 | break; 176 | case SASL_NTLM_STATE_DONE: 177 | $client->error = "NTLM authentication was finished without success"; 178 | return (SASL_FAIL); 179 | default: 180 | $client->error = "invalid NTLM authentication step state"; 181 | return (SASL_FAIL); 182 | } 183 | return (SASL_CONTINUE); 184 | } 185 | } 186 | -------------------------------------------------------------------------------- /PHPMailer/examples/styles/shCoreEmacs.css: -------------------------------------------------------------------------------- 1 | .syntaxhighlighter a,.syntaxhighlighter div,.syntaxhighlighter code,.syntaxhighlighter table,.syntaxhighlighter table td,.syntaxhighlighter table tr,.syntaxhighlighter table tbody,.syntaxhighlighter table thead,.syntaxhighlighter table caption,.syntaxhighlighter textarea{-moz-border-radius:0 0 0 0 !important;-webkit-border-radius:0 0 0 0 !important;background:none !important;border:0 !important;bottom:auto !important;float:none !important;height:auto !important;left:auto !important;line-height:1.1em !important;margin:0 !important;outline:0 !important;overflow:visible !important;padding:0 !important;position:static !important;right:auto !important;text-align:left !important;top:auto !important;vertical-align:baseline !important;width:auto !important;box-sizing:content-box !important;font-family:"Consolas","Bitstream Vera Sans Mono","Courier New",Courier,monospace !important;font-weight:normal !important;font-style:normal !important;font-size:1em !important;min-height:inherit !important;min-height:auto !important;} 2 | .syntaxhighlighter{width:100% !important;margin:1em 0 1em 0 !important;position:relative !important;overflow:auto !important;font-size:1em !important;} 3 | .syntaxhighlighter.source{overflow:hidden !important;} 4 | .syntaxhighlighter .bold{font-weight:bold !important;} 5 | .syntaxhighlighter .italic{font-style:italic !important;} 6 | .syntaxhighlighter .line{white-space:pre !important;} 7 | .syntaxhighlighter table{width:100% !important;} 8 | .syntaxhighlighter table caption{text-align:left !important;padding:.5em 0 0.5em 1em !important;} 9 | .syntaxhighlighter table td.code{width:100% !important;} 10 | .syntaxhighlighter table td.code .container{position:relative !important;} 11 | .syntaxhighlighter table td.code .container textarea{box-sizing:border-box !important;position:absolute !important;left:0 !important;top:0 !important;width:100% !important;height:100% !important;border:none !important;background:white !important;padding-left:1em !important;overflow:hidden !important;white-space:pre !important;} 12 | .syntaxhighlighter table td.gutter .line{text-align:right !important;padding:0 0.5em 0 1em !important;} 13 | .syntaxhighlighter table td.code .line{padding:0 1em !important;} 14 | .syntaxhighlighter.nogutter td.code .container textarea,.syntaxhighlighter.nogutter td.code .line{padding-left:0em !important;} 15 | .syntaxhighlighter.show{display:block !important;} 16 | .syntaxhighlighter.collapsed table{display:none !important;} 17 | .syntaxhighlighter.collapsed .toolbar{padding:0.1em 0.8em 0em 0.8em !important;font-size:1em !important;position:static !important;width:auto !important;height:auto !important;} 18 | .syntaxhighlighter.collapsed .toolbar span{display:inline !important;margin-right:1em !important;} 19 | .syntaxhighlighter.collapsed .toolbar span a{padding:0 !important;display:none !important;} 20 | .syntaxhighlighter.collapsed .toolbar span a.expandSource{display:inline !important;} 21 | .syntaxhighlighter .toolbar{position:absolute !important;right:1px !important;top:1px !important;width:11px !important;height:11px !important;font-size:10px !important;z-index:10 !important;} 22 | .syntaxhighlighter .toolbar span.title{display:inline !important;} 23 | .syntaxhighlighter .toolbar a{display:block !important;text-align:center !important;text-decoration:none !important;padding-top:1px !important;} 24 | .syntaxhighlighter .toolbar a.expandSource{display:none !important;} 25 | .syntaxhighlighter.ie{font-size:.9em !important;padding:1px 0 1px 0 !important;} 26 | .syntaxhighlighter.ie .toolbar{line-height:8px !important;} 27 | .syntaxhighlighter.ie .toolbar a{padding-top:0px !important;} 28 | .syntaxhighlighter.printing .line.alt1 .content,.syntaxhighlighter.printing .line.alt2 .content,.syntaxhighlighter.printing .line.highlighted .number,.syntaxhighlighter.printing .line.highlighted.alt1 .content,.syntaxhighlighter.printing .line.highlighted.alt2 .content{background:none !important;} 29 | .syntaxhighlighter.printing .line .number{color:#bbbbbb !important;} 30 | .syntaxhighlighter.printing .line .content{color:black !important;} 31 | .syntaxhighlighter.printing .toolbar{display:none !important;} 32 | .syntaxhighlighter.printing a{text-decoration:none !important;} 33 | .syntaxhighlighter.printing .plain,.syntaxhighlighter.printing .plain a{color:black !important;} 34 | .syntaxhighlighter.printing .comments,.syntaxhighlighter.printing .comments a{color:#008200 !important;} 35 | .syntaxhighlighter.printing .string,.syntaxhighlighter.printing .string a{color:blue !important;} 36 | .syntaxhighlighter.printing .keyword{color:#006699 !important;font-weight:bold !important;} 37 | .syntaxhighlighter.printing .preprocessor{color:gray !important;} 38 | .syntaxhighlighter.printing .variable{color:#aa7700 !important;} 39 | .syntaxhighlighter.printing .value{color:#009900 !important;} 40 | .syntaxhighlighter.printing .functions{color:#ff1493 !important;} 41 | .syntaxhighlighter.printing .constants{color:#0066cc !important;} 42 | .syntaxhighlighter.printing .script{font-weight:bold !important;} 43 | .syntaxhighlighter.printing .color1,.syntaxhighlighter.printing .color1 a{color:gray !important;} 44 | .syntaxhighlighter.printing .color2,.syntaxhighlighter.printing .color2 a{color:#ff1493 !important;} 45 | .syntaxhighlighter.printing .color3,.syntaxhighlighter.printing .color3 a{color:red !important;} 46 | .syntaxhighlighter.printing .break,.syntaxhighlighter.printing .break a{color:black !important;} 47 | .syntaxhighlighter{background-color:black !important;} 48 | .syntaxhighlighter .line.alt1{background-color:black !important;} 49 | .syntaxhighlighter .line.alt2{background-color:black !important;} 50 | .syntaxhighlighter .line.highlighted.alt1,.syntaxhighlighter .line.highlighted.alt2{background-color:#2a3133 !important;} 51 | .syntaxhighlighter .line.highlighted.number{color:white !important;} 52 | .syntaxhighlighter table caption{color:#d3d3d3 !important;} 53 | .syntaxhighlighter .gutter{color:#d3d3d3 !important;} 54 | .syntaxhighlighter .gutter .line{border-right:3px solid #990000 !important;} 55 | .syntaxhighlighter .gutter .line.highlighted{background-color:#990000 !important;color:black !important;} 56 | .syntaxhighlighter.printing .line .content{border:none !important;} 57 | .syntaxhighlighter.collapsed{overflow:visible !important;} 58 | .syntaxhighlighter.collapsed .toolbar{color:#ebdb8d !important;background:black !important;border:1px solid #990000 !important;} 59 | .syntaxhighlighter.collapsed .toolbar a{color:#ebdb8d !important;} 60 | .syntaxhighlighter.collapsed .toolbar a:hover{color:#ff7d27 !important;} 61 | .syntaxhighlighter .toolbar{color:white !important;background:#990000 !important;border:none !important;} 62 | .syntaxhighlighter .toolbar a{color:white !important;} 63 | .syntaxhighlighter .toolbar a:hover{color:#9ccff4 !important;} 64 | .syntaxhighlighter .plain,.syntaxhighlighter .plain a{color:#d3d3d3 !important;} 65 | .syntaxhighlighter .comments,.syntaxhighlighter .comments a{color:#ff7d27 !important;} 66 | .syntaxhighlighter .string,.syntaxhighlighter .string a{color:#ff9e7b !important;} 67 | .syntaxhighlighter .keyword{color:aqua !important;} 68 | .syntaxhighlighter .preprocessor{color:#aec4de !important;} 69 | .syntaxhighlighter .variable{color:#ffaa3e !important;} 70 | .syntaxhighlighter .value{color:#009900 !important;} 71 | .syntaxhighlighter .functions{color:#81cef9 !important;} 72 | .syntaxhighlighter .constants{color:#ff9e7b !important;} 73 | .syntaxhighlighter .script{font-weight:bold !important;color:aqua !important;background-color:none !important;} 74 | .syntaxhighlighter .color1,.syntaxhighlighter .color1 a{color:#ebdb8d !important;} 75 | .syntaxhighlighter .color2,.syntaxhighlighter .color2 a{color:#ff7d27 !important;} 76 | .syntaxhighlighter .color3,.syntaxhighlighter .color3 a{color:#aec4de !important;} 77 | -------------------------------------------------------------------------------- /PHPMailer/examples/styles/shCoreMDUltra.css: -------------------------------------------------------------------------------- 1 | .syntaxhighlighter a,.syntaxhighlighter div,.syntaxhighlighter code,.syntaxhighlighter table,.syntaxhighlighter table td,.syntaxhighlighter table tr,.syntaxhighlighter table tbody,.syntaxhighlighter table thead,.syntaxhighlighter table caption,.syntaxhighlighter textarea{-moz-border-radius:0 0 0 0 !important;-webkit-border-radius:0 0 0 0 !important;background:none !important;border:0 !important;bottom:auto !important;float:none !important;height:auto !important;left:auto !important;line-height:1.1em !important;margin:0 !important;outline:0 !important;overflow:visible !important;padding:0 !important;position:static !important;right:auto !important;text-align:left !important;top:auto !important;vertical-align:baseline !important;width:auto !important;box-sizing:content-box !important;font-family:"Consolas","Bitstream Vera Sans Mono","Courier New",Courier,monospace !important;font-weight:normal !important;font-style:normal !important;font-size:1em !important;min-height:inherit !important;min-height:auto !important;} 2 | .syntaxhighlighter{width:100% !important;margin:1em 0 1em 0 !important;position:relative !important;overflow:auto !important;font-size:1em !important;} 3 | .syntaxhighlighter.source{overflow:hidden !important;} 4 | .syntaxhighlighter .bold{font-weight:bold !important;} 5 | .syntaxhighlighter .italic{font-style:italic !important;} 6 | .syntaxhighlighter .line{white-space:pre !important;} 7 | .syntaxhighlighter table{width:100% !important;} 8 | .syntaxhighlighter table caption{text-align:left !important;padding:.5em 0 0.5em 1em !important;} 9 | .syntaxhighlighter table td.code{width:100% !important;} 10 | .syntaxhighlighter table td.code .container{position:relative !important;} 11 | .syntaxhighlighter table td.code .container textarea{box-sizing:border-box !important;position:absolute !important;left:0 !important;top:0 !important;width:100% !important;height:100% !important;border:none !important;background:white !important;padding-left:1em !important;overflow:hidden !important;white-space:pre !important;} 12 | .syntaxhighlighter table td.gutter .line{text-align:right !important;padding:0 0.5em 0 1em !important;} 13 | .syntaxhighlighter table td.code .line{padding:0 1em !important;} 14 | .syntaxhighlighter.nogutter td.code .container textarea,.syntaxhighlighter.nogutter td.code .line{padding-left:0em !important;} 15 | .syntaxhighlighter.show{display:block !important;} 16 | .syntaxhighlighter.collapsed table{display:none !important;} 17 | .syntaxhighlighter.collapsed .toolbar{padding:0.1em 0.8em 0em 0.8em !important;font-size:1em !important;position:static !important;width:auto !important;height:auto !important;} 18 | .syntaxhighlighter.collapsed .toolbar span{display:inline !important;margin-right:1em !important;} 19 | .syntaxhighlighter.collapsed .toolbar span a{padding:0 !important;display:none !important;} 20 | .syntaxhighlighter.collapsed .toolbar span a.expandSource{display:inline !important;} 21 | .syntaxhighlighter .toolbar{position:absolute !important;right:1px !important;top:1px !important;width:11px !important;height:11px !important;font-size:10px !important;z-index:10 !important;} 22 | .syntaxhighlighter .toolbar span.title{display:inline !important;} 23 | .syntaxhighlighter .toolbar a{display:block !important;text-align:center !important;text-decoration:none !important;padding-top:1px !important;} 24 | .syntaxhighlighter .toolbar a.expandSource{display:none !important;} 25 | .syntaxhighlighter.ie{font-size:.9em !important;padding:1px 0 1px 0 !important;} 26 | .syntaxhighlighter.ie .toolbar{line-height:8px !important;} 27 | .syntaxhighlighter.ie .toolbar a{padding-top:0px !important;} 28 | .syntaxhighlighter.printing .line.alt1 .content,.syntaxhighlighter.printing .line.alt2 .content,.syntaxhighlighter.printing .line.highlighted .number,.syntaxhighlighter.printing .line.highlighted.alt1 .content,.syntaxhighlighter.printing .line.highlighted.alt2 .content{background:none !important;} 29 | .syntaxhighlighter.printing .line .number{color:#bbbbbb !important;} 30 | .syntaxhighlighter.printing .line .content{color:black !important;} 31 | .syntaxhighlighter.printing .toolbar{display:none !important;} 32 | .syntaxhighlighter.printing a{text-decoration:none !important;} 33 | .syntaxhighlighter.printing .plain,.syntaxhighlighter.printing .plain a{color:black !important;} 34 | .syntaxhighlighter.printing .comments,.syntaxhighlighter.printing .comments a{color:#008200 !important;} 35 | .syntaxhighlighter.printing .string,.syntaxhighlighter.printing .string a{color:blue !important;} 36 | .syntaxhighlighter.printing .keyword{color:#006699 !important;font-weight:bold !important;} 37 | .syntaxhighlighter.printing .preprocessor{color:gray !important;} 38 | .syntaxhighlighter.printing .variable{color:#aa7700 !important;} 39 | .syntaxhighlighter.printing .value{color:#009900 !important;} 40 | .syntaxhighlighter.printing .functions{color:#ff1493 !important;} 41 | .syntaxhighlighter.printing .constants{color:#0066cc !important;} 42 | .syntaxhighlighter.printing .script{font-weight:bold !important;} 43 | .syntaxhighlighter.printing .color1,.syntaxhighlighter.printing .color1 a{color:gray !important;} 44 | .syntaxhighlighter.printing .color2,.syntaxhighlighter.printing .color2 a{color:#ff1493 !important;} 45 | .syntaxhighlighter.printing .color3,.syntaxhighlighter.printing .color3 a{color:red !important;} 46 | .syntaxhighlighter.printing .break,.syntaxhighlighter.printing .break a{color:black !important;} 47 | .syntaxhighlighter{background-color:#222222 !important;} 48 | .syntaxhighlighter .line.alt1{background-color:#222222 !important;} 49 | .syntaxhighlighter .line.alt2{background-color:#222222 !important;} 50 | .syntaxhighlighter .line.highlighted.alt1,.syntaxhighlighter .line.highlighted.alt2{background-color:#253e5a !important;} 51 | .syntaxhighlighter .line.highlighted.number{color:white !important;} 52 | .syntaxhighlighter table caption{color:lime !important;} 53 | .syntaxhighlighter .gutter{color:#38566f !important;} 54 | .syntaxhighlighter .gutter .line{border-right:3px solid #435a5f !important;} 55 | .syntaxhighlighter .gutter .line.highlighted{background-color:#435a5f !important;color:#222222 !important;} 56 | .syntaxhighlighter.printing .line .content{border:none !important;} 57 | .syntaxhighlighter.collapsed{overflow:visible !important;} 58 | .syntaxhighlighter.collapsed .toolbar{color:#428bdd !important;background:black !important;border:1px solid #435a5f !important;} 59 | .syntaxhighlighter.collapsed .toolbar a{color:#428bdd !important;} 60 | .syntaxhighlighter.collapsed .toolbar a:hover{color:lime !important;} 61 | .syntaxhighlighter .toolbar{color:#aaaaff !important;background:#435a5f !important;border:none !important;} 62 | .syntaxhighlighter .toolbar a{color:#aaaaff !important;} 63 | .syntaxhighlighter .toolbar a:hover{color:#9ccff4 !important;} 64 | .syntaxhighlighter .plain,.syntaxhighlighter .plain a{color:lime !important;} 65 | .syntaxhighlighter .comments,.syntaxhighlighter .comments a{color:#428bdd !important;} 66 | .syntaxhighlighter .string,.syntaxhighlighter .string a{color:lime !important;} 67 | .syntaxhighlighter .keyword{color:#aaaaff !important;} 68 | .syntaxhighlighter .preprocessor{color:#8aa6c1 !important;} 69 | .syntaxhighlighter .variable{color:aqua !important;} 70 | .syntaxhighlighter .value{color:#f7e741 !important;} 71 | .syntaxhighlighter .functions{color:#ff8000 !important;} 72 | .syntaxhighlighter .constants{color:yellow !important;} 73 | .syntaxhighlighter .script{font-weight:bold !important;color:#aaaaff !important;background-color:none !important;} 74 | .syntaxhighlighter .color1,.syntaxhighlighter .color1 a{color:red !important;} 75 | .syntaxhighlighter .color2,.syntaxhighlighter .color2 a{color:yellow !important;} 76 | .syntaxhighlighter .color3,.syntaxhighlighter .color3 a{color:#ffaa3e !important;} 77 | -------------------------------------------------------------------------------- /PHPMailer/examples/styles/shCoreRDark.css: -------------------------------------------------------------------------------- 1 | .syntaxhighlighter a,.syntaxhighlighter div,.syntaxhighlighter code,.syntaxhighlighter table,.syntaxhighlighter table td,.syntaxhighlighter table tr,.syntaxhighlighter table tbody,.syntaxhighlighter table thead,.syntaxhighlighter table caption,.syntaxhighlighter textarea{-moz-border-radius:0 0 0 0 !important;-webkit-border-radius:0 0 0 0 !important;background:none !important;border:0 !important;bottom:auto !important;float:none !important;height:auto !important;left:auto !important;line-height:1.1em !important;margin:0 !important;outline:0 !important;overflow:visible !important;padding:0 !important;position:static !important;right:auto !important;text-align:left !important;top:auto !important;vertical-align:baseline !important;width:auto !important;box-sizing:content-box !important;font-family:"Consolas","Bitstream Vera Sans Mono","Courier New",Courier,monospace !important;font-weight:normal !important;font-style:normal !important;font-size:1em !important;min-height:inherit !important;min-height:auto !important;} 2 | .syntaxhighlighter{width:100% !important;margin:1em 0 1em 0 !important;position:relative !important;overflow:auto !important;font-size:1em !important;} 3 | .syntaxhighlighter.source{overflow:hidden !important;} 4 | .syntaxhighlighter .bold{font-weight:bold !important;} 5 | .syntaxhighlighter .italic{font-style:italic !important;} 6 | .syntaxhighlighter .line{white-space:pre !important;} 7 | .syntaxhighlighter table{width:100% !important;} 8 | .syntaxhighlighter table caption{text-align:left !important;padding:.5em 0 0.5em 1em !important;} 9 | .syntaxhighlighter table td.code{width:100% !important;} 10 | .syntaxhighlighter table td.code .container{position:relative !important;} 11 | .syntaxhighlighter table td.code .container textarea{box-sizing:border-box !important;position:absolute !important;left:0 !important;top:0 !important;width:100% !important;height:100% !important;border:none !important;background:white !important;padding-left:1em !important;overflow:hidden !important;white-space:pre !important;} 12 | .syntaxhighlighter table td.gutter .line{text-align:right !important;padding:0 0.5em 0 1em !important;} 13 | .syntaxhighlighter table td.code .line{padding:0 1em !important;} 14 | .syntaxhighlighter.nogutter td.code .container textarea,.syntaxhighlighter.nogutter td.code .line{padding-left:0em !important;} 15 | .syntaxhighlighter.show{display:block !important;} 16 | .syntaxhighlighter.collapsed table{display:none !important;} 17 | .syntaxhighlighter.collapsed .toolbar{padding:0.1em 0.8em 0em 0.8em !important;font-size:1em !important;position:static !important;width:auto !important;height:auto !important;} 18 | .syntaxhighlighter.collapsed .toolbar span{display:inline !important;margin-right:1em !important;} 19 | .syntaxhighlighter.collapsed .toolbar span a{padding:0 !important;display:none !important;} 20 | .syntaxhighlighter.collapsed .toolbar span a.expandSource{display:inline !important;} 21 | .syntaxhighlighter .toolbar{position:absolute !important;right:1px !important;top:1px !important;width:11px !important;height:11px !important;font-size:10px !important;z-index:10 !important;} 22 | .syntaxhighlighter .toolbar span.title{display:inline !important;} 23 | .syntaxhighlighter .toolbar a{display:block !important;text-align:center !important;text-decoration:none !important;padding-top:1px !important;} 24 | .syntaxhighlighter .toolbar a.expandSource{display:none !important;} 25 | .syntaxhighlighter.ie{font-size:.9em !important;padding:1px 0 1px 0 !important;} 26 | .syntaxhighlighter.ie .toolbar{line-height:8px !important;} 27 | .syntaxhighlighter.ie .toolbar a{padding-top:0px !important;} 28 | .syntaxhighlighter.printing .line.alt1 .content,.syntaxhighlighter.printing .line.alt2 .content,.syntaxhighlighter.printing .line.highlighted .number,.syntaxhighlighter.printing .line.highlighted.alt1 .content,.syntaxhighlighter.printing .line.highlighted.alt2 .content{background:none !important;} 29 | .syntaxhighlighter.printing .line .number{color:#bbbbbb !important;} 30 | .syntaxhighlighter.printing .line .content{color:black !important;} 31 | .syntaxhighlighter.printing .toolbar{display:none !important;} 32 | .syntaxhighlighter.printing a{text-decoration:none !important;} 33 | .syntaxhighlighter.printing .plain,.syntaxhighlighter.printing .plain a{color:black !important;} 34 | .syntaxhighlighter.printing .comments,.syntaxhighlighter.printing .comments a{color:#008200 !important;} 35 | .syntaxhighlighter.printing .string,.syntaxhighlighter.printing .string a{color:blue !important;} 36 | .syntaxhighlighter.printing .keyword{color:#006699 !important;font-weight:bold !important;} 37 | .syntaxhighlighter.printing .preprocessor{color:gray !important;} 38 | .syntaxhighlighter.printing .variable{color:#aa7700 !important;} 39 | .syntaxhighlighter.printing .value{color:#009900 !important;} 40 | .syntaxhighlighter.printing .functions{color:#ff1493 !important;} 41 | .syntaxhighlighter.printing .constants{color:#0066cc !important;} 42 | .syntaxhighlighter.printing .script{font-weight:bold !important;} 43 | .syntaxhighlighter.printing .color1,.syntaxhighlighter.printing .color1 a{color:gray !important;} 44 | .syntaxhighlighter.printing .color2,.syntaxhighlighter.printing .color2 a{color:#ff1493 !important;} 45 | .syntaxhighlighter.printing .color3,.syntaxhighlighter.printing .color3 a{color:red !important;} 46 | .syntaxhighlighter.printing .break,.syntaxhighlighter.printing .break a{color:black !important;} 47 | .syntaxhighlighter{background-color:#1b2426 !important;} 48 | .syntaxhighlighter .line.alt1{background-color:#1b2426 !important;} 49 | .syntaxhighlighter .line.alt2{background-color:#1b2426 !important;} 50 | .syntaxhighlighter .line.highlighted.alt1,.syntaxhighlighter .line.highlighted.alt2{background-color:#323e41 !important;} 51 | .syntaxhighlighter .line.highlighted.number{color:#b9bdb6 !important;} 52 | .syntaxhighlighter table caption{color:#b9bdb6 !important;} 53 | .syntaxhighlighter .gutter{color:#afafaf !important;} 54 | .syntaxhighlighter .gutter .line{border-right:3px solid #435a5f !important;} 55 | .syntaxhighlighter .gutter .line.highlighted{background-color:#435a5f !important;color:#1b2426 !important;} 56 | .syntaxhighlighter.printing .line .content{border:none !important;} 57 | .syntaxhighlighter.collapsed{overflow:visible !important;} 58 | .syntaxhighlighter.collapsed .toolbar{color:#5ba1cf !important;background:black !important;border:1px solid #435a5f !important;} 59 | .syntaxhighlighter.collapsed .toolbar a{color:#5ba1cf !important;} 60 | .syntaxhighlighter.collapsed .toolbar a:hover{color:#5ce638 !important;} 61 | .syntaxhighlighter .toolbar{color:white !important;background:#435a5f !important;border:none !important;} 62 | .syntaxhighlighter .toolbar a{color:white !important;} 63 | .syntaxhighlighter .toolbar a:hover{color:#e0e8ff !important;} 64 | .syntaxhighlighter .plain,.syntaxhighlighter .plain a{color:#b9bdb6 !important;} 65 | .syntaxhighlighter .comments,.syntaxhighlighter .comments a{color:#878a85 !important;} 66 | .syntaxhighlighter .string,.syntaxhighlighter .string a{color:#5ce638 !important;} 67 | .syntaxhighlighter .keyword{color:#5ba1cf !important;} 68 | .syntaxhighlighter .preprocessor{color:#435a5f !important;} 69 | .syntaxhighlighter .variable{color:#ffaa3e !important;} 70 | .syntaxhighlighter .value{color:#009900 !important;} 71 | .syntaxhighlighter .functions{color:#ffaa3e !important;} 72 | .syntaxhighlighter .constants{color:#e0e8ff !important;} 73 | .syntaxhighlighter .script{font-weight:bold !important;color:#5ba1cf !important;background-color:none !important;} 74 | .syntaxhighlighter .color1,.syntaxhighlighter .color1 a{color:#e0e8ff !important;} 75 | .syntaxhighlighter .color2,.syntaxhighlighter .color2 a{color:white !important;} 76 | .syntaxhighlighter .color3,.syntaxhighlighter .color3 a{color:#ffaa3e !important;} 77 | --------------------------------------------------------------------------------