No template when sending wp_mail from php
-
I’m sending a system and a customer email from a php script as shown below.. however neither of them are receiving the wp_better_emails template. It is working for general system messages generated by wp. Any suggestions please?
I’ve tried different variations eg missing off the headers or forcing the type to plain text
//customer email subject = "The Subject"; $message = "Hi there! You have successfully subscribed to XXX and resources, your membership is free. Your username is {$user_username} and your password is {$user_pass}\nYou can start managing your subscription at https://www.XXX.com/login/."; $headers = 'From: XXX <[email protected]>' . "\r\n"; $success = wp_mail( $user_email, $subject, $message, $headers); //system email wp_mail( '[email protected]', 'Remote registration', "User {$user_username}, {$user_email} was registered on " . date ('d.m. Y H:i:s', time() ) );
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘No template when sending wp_mail from php’ is closed to new replies.