Guest User

Untitled

a guest
Mar 7th, 2016
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.91 KB | None | 0 0
  1. <?php
  2. /**
  3. * Setup mail server config
  4. */
  5. $to = "supporto@xeplorersmart"; $from = "supporto@xeplorersmart.com";
  6.  
  7. //where we would like to send email
  8. $recipientEmail = 'supporto@xeplorersmart.com';
  9. $recipientName = 'supporto@xeplorersmart.com';
  10.  
  11. //Address which will be visible in "From" field
  12. $fromEmail = 'supporto@xeplorersmart.com';
  13. $fromName = 'supporto@xeplorersmart.com';
  14.  
  15. //Validation error messages
  16. $requiredMessage = 'Campo è obbligatorio';
  17. $invalidEmail = 'Email invalida';
  18.  
  19. /**
  20. * Advanced configuration - no need to modify
  21. */
  22.  
  23. require_once(dirname(__FILE__) . '/vendor/ctPHPMailer.php');
  24. $mail = new ctPHPMailer();
  25.  
  26. //set your email address
  27. $mail->AddAddress($recipientEmail, $recipientName);
  28. $mail->SetFrom($fromEmail, $fromName);
  29.  
  30.  
  31. $debug = false; //if problems occur, set to true to view debug messages
  32.  
  33. /**
  34. * For GMAIL configuration please use this values:
  35. *
  36. * $mail->Host = "smtp.gmail.com"; // SMTP server
  37. * $mail->Username = "mail@gmail.com"; // SMTP account username
  38. * $mail->Password = "yourpassword"; // SMTP account password
  39. * $mail->Port = 465; // set the SMTP port for the GMAIL server
  40. * $mail->SMTPSecure = "ssl";
  41. *
  42. * More configuration options available here: https://code.google.com/a/apache-extras.org/p/phpmailer/wiki/ExamplesPage
  43. */
  44.  
  45. /**
  46. * SERVER CONFIG
  47. */
  48.  
  49. /**
  50. * Config for SMTP server - uncomment if you don't want to use PHP mail() function
  51. **/
  52.  
  53. /**
  54. * $mail->Host = "mail.yourdomain.com."; // sets the SMTP server
  55. * $mail->Username = "username"; // SMTP account username
  56. * $mail->Password = "password"; // SMTP account password
  57. * $mail->SMTPAuth = true; // enable SMTP authentication - true if username and password required
  58. * $mail->Port = 587; // set the SMTP port (usually 587, or 465 when SSL)
  59. * $mail->IsSMTP(); uncomment it to enable smtp
  60. * $mail->SMTPDebug = $debug ? 2 : 0; // debug messages - set debug to false on production!
  61. */
Add Comment
Please, Sign In to add comment