Advertisement
Guest User

Untitled

a guest
Jul 1st, 2016
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.04 KB | None | 0 0
  1. <?php
  2.  
  3. // autoload_real.php @generated by Composer
  4.  
  5. class ComposerAutoloaderInitc464cd297beeacd6184307779713d465
  6. {
  7. private static $loader;
  8.  
  9. public static function loadClassLoader($class)
  10. {
  11. if ('ComposerAutoloadClassLoader' === $class) {
  12. require __DIR__ . '/ClassLoader.php';
  13. }
  14. }
  15.  
  16. public static function getLoader()
  17. {
  18. if (null !== self::$loader) {
  19. return self::$loader;
  20. }
  21.  
  22. spl_autoload_register(array('ComposerAutoloaderInitc464cd297beeacd6184307779713d465', 'loadClassLoader'), true, true);
  23. self::$loader = $loader = new ComposerAutoloadClassLoader();
  24. spl_autoload_unregister(array('ComposerAutoloaderInitc464cd297beeacd6184307779713d465', 'loadClassLoader'));
  25.  
  26. $map = require __DIR__ . '/autoload_namespaces.php';
  27. foreach ($map as $namespace => $path) {
  28. $loader->set($namespace, $path);
  29. }
  30.  
  31. $map = require __DIR__ . '/autoload_psr4.php';
  32. foreach ($map as $namespace => $path) {
  33. $loader->setPsr4($namespace, $path);
  34. }
  35.  
  36. $classMap = require __DIR__ . '/autoload_classmap.php';
  37. if ($classMap) {
  38. $loader->addClassMap($classMap);
  39. }
  40.  
  41. $loader->register(true);
  42.  
  43. return $loader;
  44. }
  45. }
  46.  
  47. function composerRequirec464cd297beeacd6184307779713d465($file)
  48. {
  49. require $file;
  50. }
  51.  
  52. <?php
  53.  
  54. // autoload.php @generated by Composer
  55.  
  56. require_once "vendor/composer/autoload_real.php";
  57.  
  58. return ComposerAutoloaderInitc464cd297beeacd6184307779713d465::getLoader();
  59.  
  60. //Create a new PHPMailer instance
  61. $mail = new PHPMailer;
  62. //Tell PHPMailer to use SMTP
  63. $mail->isSMTP();
  64. //Enable SMTP debugging
  65. // 0 = off (for production use)
  66. // 1 = client messages
  67. // 2 = client and server messages
  68. $mail->SMTPDebug = 2;
  69. //Ask for HTML-friendly debug output
  70. $mail->Debugoutput = 'html';
  71. //Set the hostname of the mail server
  72. $mail->Host = 'smtp.gmail.com';
  73. // use
  74. // $mail->Host = gethostbyname('smtp.gmail.com');
  75. // if your network does not support SMTP over IPv6
  76. //Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission
  77. $mail->Port = 587;
  78. //Set the encryption system to use - ssl (deprecated) or tls
  79. $mail->SMTPSecure = 'tls';
  80. //Whether to use SMTP authentication
  81. $mail->SMTPAuth = true;
  82. //Username to use for SMTP authentication - use full email address for gmail
  83. $mail->Username = "matthewsmalan@gmail.com";
  84. //Password to use for SMTP authentication
  85. $mail->Password = "secret";
  86. //Set who the message is to be sent from
  87. $mail->setFrom('matthewsmalan@gmail.com', 'Matthew Malan');
  88. //Set an alternative reply-to address
  89. $mail->addReplyTo('matthewsmalan@gmail.com', 'Matthew Malan');
  90. //Set who the message is to be sent to
  91. $mail->addAddress('matthewsmalan@gmail.com', 'Matthew Malan');
  92. //Set the subject line
  93. $mail->Subject = 'PHPMailer GMail SMTP test';
  94. //Read an HTML message body from an external file, convert referenced images to embedded,
  95.  
  96. //send the message, check for errors
  97. if (!$mail->send()) {
  98. echo "Mailer Error: " . $mail->ErrorInfo;
  99. } else {
  100. echo "Message sent!";
  101. }
  102.  
  103. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement