• Resolved APPWEB

    (@appweb)


    Hi.
    I have tried, many things, but i cant get i to work…
    How can i get it to send mail with charset=UTF-8
    I have problems danish like ?????? it show in mail as “???| ???? ???¥”
    Here is some of my code:

    </script>'; 
    
    	    $from 		= "xxxxxxx.dk <[email protected]>";
    		$to 		= $owner_email;
    		$subject 	= "Test-Mails";
    		$headers 	= "From:" . $from;
    		
    //              wp_mail($owner_email, 'New Dispatched Job', $message);	
    // 		TEst-Mail
    
    //		mail('[email protected]', $subject, $message, $headers);
    		mail('[email protected]', $subject, $message, $headers);
    	}
    

    Best regards
    AppWeB
    Denmark

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    You can use the “wp_mail_charset” filter to alter the charset used in wp_mail(). The default charset is the same as that used by WP, which is generally UTF-8 already. You can verify at /wp-admin/options.php. Look for the “blog_charset” option.

    It could be some other code is altering the email charset through the same filter. To ensure your filter callback has the final say, add your filter callback with a very large priority argument in add_filter().

    Before going through any of this, are you really sure email is NOT using UTF-8 charset? Don’t judge only by inappropriate characters, view an email message’s raw content. Below all the Received: headers and To: and From: stuff and just above the actual message should be the line:
    Content-Type: text/plain; charset="UTF-8"

    Thread Starter APPWEB

    (@appweb)

    Thanks for reply

    I got a programmer to fix it for me.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘char set / change maybe UTF8 ???’ is closed to new replies.