×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Text
Posted by: 123 DEV
Added: Jan 12, 2023 2:21 PM
Views: 0
Tags: no tags
  1. /* ##############################################################
  2. =  Email SMTP MANDRILL
  3. */
  4.  
  5. add_action('phpmailer_init','send_smtp_email');
  6. function send_smtp_email( $phpmailer ){
  7.     // Define that we are sending with SMTP
  8.     $phpmailer->isSMTP();
  9.  
  10.     // The hostname of the mail server
  11.     $phpmailer->Host = "smtp.mandrillapp.com";
  12.  
  13.     // Use SMTP authentication (true|false)
  14.     $phpmailer->SMTPAuth = true;
  15.  
  16.     // SMTP port number - likely to be 25, 465 or 587
  17.     $phpmailer->Port = "465";
  18.  
  19.     // Username to use for SMTP authentication
  20.     $phpmailer->Username = "123dev";
  21.  
  22.     // Password to use for SMTP authentication
  23.     $phpmailer->Password = "Xl_hSK2EpDqptSO6uaBUUg";
  24.  
  25.     // The encryption system to use - ssl (deprecated) or tls
  26.     $phpmailer->SMTPSecure = "ssl";
  27.  
  28. }