Advertisement
Guest User

Untitled

a guest
Mar 20th, 2017
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.79 KB | None | 0 0
  1. <?php
  2. require __DIR__ . '/vendor/autoload.php';
  3. $included_files = get_included_files();
  4.  
  5. foreach ($included_files as $filename) {
  6. echo "$filenamen";
  7. }
  8.  
  9. $mail = new PHPMailer;
  10.  
  11. $mail->isSMTP(); // Set mailer to use SMTP
  12. $mail->Host = 'smtp.gmail.com'; // Specify main and backup SMTP servers
  13. $mail->SMTPAuth = true; // Enable SMTP authentication
  14. $mail->Username = 'rottenrobbie911@gmail.com'; // SMTP username
  15. $mail->Password = ''; // SMTP password
  16. $mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
  17. $mail->Port = 465;
  18.  
  19. $mail->setFrom('from@example.com', 'Mailer');
  20. $mail->addAddress('yalnifcam2@gmail.com', 'Joe User');
  21.  
  22. $mail->Subject = 'GenericSubject';
  23. $mail->Body = 'This is the HTML message body <b>in bold!</b>';
  24.  
  25. if(!$mail->send()) {
  26. echo 'Message could not be sent.';
  27. echo 'Mailer Error: ' . $mail->ErrorInfo;
  28. } else {
  29. echo 'Message has been sent';
  30. }
  31. ?>
  32.  
  33. /var/www/html/mail.php /var/www/html/vendor/autoload.php /var/www/html/vendor/composer/autoload_real.php /var/www/html/vendor/composer/ClassLoader.php /var/www/html/vendor/composer/autoload_static.php /var/www/html/vendor/guzzlehttp/promises/src/functions_include.php /var/www/html/vendor/guzzlehttp/promises/src/functions.php /var/www/html/vendor/guzzlehttp/psr7/src/functions_include.php /var/www/html/vendor/guzzlehttp/psr7/src/functions.php /var/www/html/vendor/paragonie/random_compat/lib/random.php /var/www/html/vendor/guzzlehttp/guzzle/src/functions_include.php /var/www/html/vendor/guzzlehttp/guzzle/src/functions.php /var/www/html/vendor/sendgrid/sendgrid/lib/SendGrid.php /var/www/html/vendor/sendgrid/sendgrid/lib/helpers/mail/Mail.php /var/www/html/vendor/swiftmailer/swiftmailer/lib/swift_required.php /var/www/html/vendor/swiftmailer/swiftmailer/lib/classes/Swift.php
  34. Message could not be sent.Mailer Error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
  35.  
  36. isSMTP(); // Set mailer to use SMTP $mail->Host = 'smtp.gmail.com'; // Specify main and backup SMTP servers $mail->SMTPAuth = true; // Enable SMTP authentication $mail->Username = 'rottenrobbie911@gmail.com'; // SMTP username $mail->Password = 'password';
  37. // SMTP password $mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted $mail->Port = 465; $mail->setFrom('from@example.com', 'Mailer'); $mail->addAddress('yalnifcam2@gmail.com', 'Joe User'); $mail->Subject
  38. = 'GenericSubject'; $mail->Body = 'This is the HTML message body in bold!'; if(!$mail->send()) { echo 'Message could not be sent.'; echo 'Mailer Error: ' . $mail->ErrorInfo; } else { echo 'Message has been sent'; } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement