Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( "phpmailer_init", "send_smtp_email" );
- function send_smtp_email( $phpmailer ) {
- ini_set("sendmail_from","xyz@gmail.com");
- ini_set("sendmail_path","xyz@gmail.com");
- // Define that we are sending with SMTP
- $phpmailer->isSMTP();
- // The hostname of the mail server
- $phpmailer->Host = "localhost";
- // Use SMTP authentication (true|false)
- $phpmailer->SMTPAuth = false;
- // SMTP port number - likely to be 25, 465 or 587
- $phpmailer->Port = "25";
- // Encryption system to use - ssl or tls
- $phpmailer->SMTPSecure = "tls";
- $phpmailer->From = "xyz@gmail.com";
- $phpmailer->FromName = "XYZ";
- }
- $headers = array('MIME-Version: 1.0'.'From: '.$_POST['namee'].'<'.$_POST['email'].'>'.'Reply-To: '.$_POST['email']);
- $comment = $comment . "rn" . "rnIP Address: " . $id . "rnUser Agent: " . $browser . "rnReferrer: " . $referrer;
- wp_mail($to,$website,$comment,$headers);
- add_action( "phpmailer_init", "send_smtp_email" );
- function send_smtp_email( $phpmailer ) {
- // ini_set("sendmail_from","xyz@gmail.com");
- // ini_set("sendmail_path","xyz@gmail.com");
- // Define that we are sending with SMTP
- $phpmailer->isSMTP();
- // The hostname of the mail server
- $phpmailer->Host = "localhost";
- // Use SMTP authentication (true|false)
- $phpmailer->SMTPAuth = false;
- // SMTP port number - likely to be 25, 465 or 587
- $phpmailer->Port = "25";
- // Encryption system to use - ssl or tls
- $phpmailer->SMTPSecure = "tls";
- // $phpmailer->From = "xyz@gmail.com";
- // $phpmailer->FromName = "XYZ";
- }
Add Comment
Please, Sign In to add comment