WordPress Send Email in Foreign Language – Japanese
can i buy prednisolone over the counter in uk Sending emails in Japanese language was a challenge for me. Any email, which had a subject in Japanese language failed and was not being sent at all. I tried encoding the email subject, but nothing worked. I tweaked things until i found a solution. I then re-defined the wordpress core wp_mail() function to allow sending emails with Japanese language in subject. My solution is given below (see modifications from line 337 and onwards in code below): //wp_mail redefined, to send japanese subject line in emails. function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() ) { // Compact the input, apply the filters, and extract them back out /** * Filter the wp_mail() arguments. * * @since 2.2.0 * * @param array $args A compacted array of wp_mail() arguments, including the "to" email, * subject, message, headers, and attachments values. */ $atts = apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers', 'attachments' ) ); if ( isset( $atts['to'] ) ) { $to = $atts['to']; } if ( isset( $atts['subject'] ) ) { $subject = $atts['subject']; } if (
sparingly