WordPress mail sending twice
-
Why wordpress mail sending twice email? Also tried php mail and it sending still twice.
$to = "customer@site.com"; $headers = "Reply-To: myemail <info@myemail.com>\r\n"; $headers .= "Return-Path: myemail <info@myemail.com>\r\n"; $headers .= "From: info@myemail.com" ."\r\n"; $headers .= "Organization: myemail.com\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=utf-8\r\n"; $headers .= "X-Priority: 3\r\n"; $headers .= "X-Mailer: PHP". phpversion() ."\r\n" ; wp_mail( $to, $subject, $content, $headers ); $admin_email = "admin@myemail.com"; $subject2 = 'Osteti uus parkla pilet!'; $headers2 = "Reply-To: myemail <info@myemail.com>\r\n"; $headers2 .= "Return-Path: myemail <info@myemail.com>\r\n"; $headers2 .= "From: info@myemail.com" ."\r\n"; $headers2 .= "Organization: myemail.com\r\n"; $headers2 .= "MIME-Version: 1.0\r\n"; $headers2 .= "Content-type: text/html; charset=utf-8\r\n"; $headers2 .= "X-Priority: 3\r\n"; $headers2 .= "X-Mailer: PHP". phpversion() ."\r\n" ;wp_mail($admin_email, $subject2, $content2, $headers2)
Im sending one email for customer if successful payment and second to site admin if there was succesful paymentI dont use any loop. Only fetching single customer email.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘WordPress mail sending twice’ is closed to new replies.