| @@ -50,13 +50,20 @@ | ||
| 50 | 50 | * |
| 51 | 51 | * @return string |
| 52 | 52 | */ |
| 53 | 53 | public function get_headers() { |
| 54 | + $charset = get_bloginfo( 'charset' ); | |
| 55 | + $charset = $charset ? $charset : 'UTF-8'; | |
| 56 | + | |
| 54 | 57 | $headers = 'MIME-Version: 1.0' . "\r\n"; |
| 55 | - $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; | |
| 58 | + $headers .= 'Content-type: text/html; charset=' . $charset . "\r\n"; | |
| 56 | 59 | $from = get_bloginfo( 'name' ); |
| 57 | 60 | $from_email = timetics_get_option('booking_created_customer_email_from'); |
| 58 | - | |
| 61 | + | |
| 62 | + if ( function_exists( 'mb_encode_mimeheader' ) ) { | |
| 63 | + $from = mb_encode_mimeheader( $from, $charset ); | |
| 64 | + } | |
| 65 | + | |
| 59 | 66 | // Append the "From" header |
| 60 | 67 | $headers .= 'From: ' .$from. ' <' . $from_email . '> ' . "\r\n"; |
| 61 | 68 | |
| 62 | 69 | return $headers; |