Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- USE SMTP TO SEND MAIL WITHOUT A PLUGIN
- */
- /* Definitions Example Sparkpost*/
- define ('MAIL_FROM_NAME','Name');
- define ('MAIL_FROM_EMAIL','your@email.com');
- define ('MAIL_HOST','smtp.sparkpostmail.com');
- define ('MAIL_PORT','2525');
- define ('MAIL_USERNAME','SMTP_Injection');
- define ('MAIL_PASSWORD','password');
- /* Our Code */
- function jetweb_smtp($phpmailer){
- $phpmailer->Mailer = "smtp";
- $phpmailer->From = MAIL_FROM_EMAIL;
- $phpmailer->FromName = MAIL_FROM_NAME;
- $phpmailer->Sender = $phpmailer->From; //Return-Path
- $phpmailer->AddReplyTo($phpmailer->From,$phpmailer->FromName); //Reply-To
- $phpmailer->Host = MAIL_HOST;
- $phpmailer->SMTPSecure = $wsOptions["smtpsecure"];
- $phpmailer->Port = MAIL_PORT;
- $phpmailer->SMTPAuth = TRUE;
- if($phpmailer->SMTPAuth){
- $phpmailer->Username = MAIL_USERNAME;
- $phpmailer->Password = MAIL_PASSWORD;
- }
- }
- add_action('phpmailer_init','wp_smtp');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement