Compare commits
3 Commits
master
...
with-phpma
Author | SHA1 | Date |
---|---|---|
|
dc64008c44 | 8 months ago |
|
3f995330ee | 1 year ago |
|
91178ad3d7 | 1 year ago |
@ -0,0 +1,40 @@ |
||||
<?php |
||||
|
||||
/** |
||||
* PHPMailer Exception class. |
||||
* PHP Version 5.5. |
||||
* |
||||
* @see https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project |
||||
* |
||||
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk> |
||||
* @author Jim Jagielski (jimjag) <jimjag@gmail.com> |
||||
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net> |
||||
* @author Brent R. Matzelle (original founder) |
||||
* @copyright 2012 - 2020 Marcus Bointon |
||||
* @copyright 2010 - 2012 Jim Jagielski |
||||
* @copyright 2004 - 2009 Andy Prevost |
||||
* @license https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License |
||||
* @note This program is distributed in the hope that it will be useful - WITHOUT |
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
||||
* FITNESS FOR A PARTICULAR PURPOSE. |
||||
*/ |
||||
|
||||
namespace PHPMailer\PHPMailer; |
||||
|
||||
/** |
||||
* PHPMailer exception handler. |
||||
* |
||||
* @author Marcus Bointon <phpmailer@synchromedia.co.uk> |
||||
*/ |
||||
class Exception extends \Exception |
||||
{ |
||||
/** |
||||
* Prettify error message output. |
||||
* |
||||
* @return string |
||||
*/ |
||||
public function errorMessage() |
||||
{ |
||||
return '<strong>' . htmlspecialchars($this->getMessage(), ENT_COMPAT | ENT_HTML401) . "</strong><br />\n"; |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,2 +0,0 @@ |
||||
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none} |
||||
/*# sourceMappingURL=normalize.min.css.map */ |
@ -1 +0,0 @@ |
||||
*{padding:0;margin:0;border:none}*,::after,::before{box-sizing:border-box}a,a:hover,a:link,a:visited{text-decoration:none}aside,footer,header,legend,main,nav,section{display:block}h1,h2,h3,h4,h5,h6,p{font-size:inherit;font-weight:inherit}ul,ul li{list-style:none}img{vertical-align:top}img,svg{max-width:100%;height:auto}address{font-style:normal}button,input,select,textarea{font-family:inherit;font-size:inherit;color:inherit;background-color:transparent}input::-ms-clear{display:none}button,input[type=submit]{display:inline-block;box-shadow:none;background:0 0;cursor:pointer}button:active,button:focus,input:active,input:focus{outline:0}button::-moz-focus-inner{padding:0;border:0}label{cursor:pointer} |
@ -0,0 +1,29 @@ |
||||
<?php |
||||
use PHPMailer\PHPMailer; |
||||
use PHPMailer\Exception; |
||||
|
||||
require 'PHPMailer/Exception.php'; |
||||
require 'PHPMailer/PHPMailer.php'; |
||||
require 'PHPMailer/SMTP.php'; |
||||
|
||||
$mail = new PHPMailer; |
||||
$mail->isSMTP(); |
||||
$mail->SMTPDebug = 2; // 0 = off (for production use) - 1 = client messages - 2 = client and server messages |
||||
$mail->Host = "smtp.gmail.com"; // use $mail->Host = gethostbyname('smtp.gmail.com'); // if your network does not support SMTP over IPv6 |
||||
$mail->Port = 587; // TLS only |
||||
$mail->SMTPSecure = 'tls'; // ssl is depracated |
||||
$mail->SMTPAuth = true; |
||||
$mail->Username = $smtpUsername; |
||||
$mail->Password = $smtpPassword; |
||||
$mail->setFrom($emailFrom, $emailFromName); |
||||
$mail->addAddress($emailTo, $emailToName); |
||||
$mail->Subject = 'PHPMailer GMail SMTP test'; |
||||
$mail->msgHTML("test body"); //$mail->msgHTML(file_get_contents('contents.html'), __DIR__); //Read an HTML message body from an external file, convert referenced images to embedded, |
||||
$mail->AltBody = 'HTML messaging not supported'; |
||||
// $mail->addAttachment('images/phpmailer_mini.png'); //Attach an image file |
||||
|
||||
if(!$mail->send()){ |
||||
echo "Mailer Error: " . $mail->ErrorInfo; |
||||
}else{ |
||||
echo "Message sent!"; |
||||
} |
Loading…
Reference in new issue