Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // autoload_real.php @generated by Composer
- class ComposerAutoloaderInitc464cd297beeacd6184307779713d465
- {
- private static $loader;
- public static function loadClassLoader($class)
- {
- if ('ComposerAutoloadClassLoader' === $class) {
- require __DIR__ . '/ClassLoader.php';
- }
- }
- public static function getLoader()
- {
- if (null !== self::$loader) {
- return self::$loader;
- }
- spl_autoload_register(array('ComposerAutoloaderInitc464cd297beeacd6184307779713d465', 'loadClassLoader'), true, true);
- self::$loader = $loader = new ComposerAutoloadClassLoader();
- spl_autoload_unregister(array('ComposerAutoloaderInitc464cd297beeacd6184307779713d465', 'loadClassLoader'));
- $map = require __DIR__ . '/autoload_namespaces.php';
- foreach ($map as $namespace => $path) {
- $loader->set($namespace, $path);
- }
- $map = require __DIR__ . '/autoload_psr4.php';
- foreach ($map as $namespace => $path) {
- $loader->setPsr4($namespace, $path);
- }
- $classMap = require __DIR__ . '/autoload_classmap.php';
- if ($classMap) {
- $loader->addClassMap($classMap);
- }
- $loader->register(true);
- return $loader;
- }
- }
- function composerRequirec464cd297beeacd6184307779713d465($file)
- {
- require $file;
- }
- <?php
- // autoload.php @generated by Composer
- require_once "vendor/composer/autoload_real.php";
- return ComposerAutoloaderInitc464cd297beeacd6184307779713d465::getLoader();
- //Create a new PHPMailer instance
- $mail = new PHPMailer;
- //Tell PHPMailer to use SMTP
- $mail->isSMTP();
- //Enable SMTP debugging
- // 0 = off (for production use)
- // 1 = client messages
- // 2 = client and server messages
- $mail->SMTPDebug = 2;
- //Ask for HTML-friendly debug output
- $mail->Debugoutput = 'html';
- //Set the hostname of the mail server
- $mail->Host = 'smtp.gmail.com';
- // use
- // $mail->Host = gethostbyname('smtp.gmail.com');
- // if your network does not support SMTP over IPv6
- //Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission
- $mail->Port = 587;
- //Set the encryption system to use - ssl (deprecated) or tls
- $mail->SMTPSecure = 'tls';
- //Whether to use SMTP authentication
- $mail->SMTPAuth = true;
- //Username to use for SMTP authentication - use full email address for gmail
- $mail->Username = "matthewsmalan@gmail.com";
- //Password to use for SMTP authentication
- $mail->Password = "secret";
- //Set who the message is to be sent from
- $mail->setFrom('matthewsmalan@gmail.com', 'Matthew Malan');
- //Set an alternative reply-to address
- $mail->addReplyTo('matthewsmalan@gmail.com', 'Matthew Malan');
- //Set who the message is to be sent to
- $mail->addAddress('matthewsmalan@gmail.com', 'Matthew Malan');
- //Set the subject line
- $mail->Subject = 'PHPMailer GMail SMTP test';
- //Read an HTML message body from an external file, convert referenced images to embedded,
- //send the message, check for errors
- if (!$mail->send()) {
- echo "Mailer Error: " . $mail->ErrorInfo;
- } else {
- echo "Message sent!";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement