WordPress.org

Support

Support » Plugins and Hacks » Ultimate Blogroll » [Resolved] Send mails in UTF-8..

[Resolved] Send mails in UTF-8..

  • In domain/UbMain.php the function sendMail() sends in charset iso-8859-1 which can problems with some languages like French for example.
    Could you change it by something like that: $headers .= ‘Content-type: text/html; charset=’.get_option(‘blog_charset’). “\r\n”;

    If it could help you here is what un modify:

    public function sendMail($linkpartner, $id) {
            ob_start();
            require_once(UB_PLUGIN_DIR."gui".DIRECTORY_SEPARATOR."Mail.php");
            $body = ob_get_clean();
            $headers  = 'MIME-Version: 1.0' . "\r\n";
            $headers .= 'Content-type: text/html;' . "\r\n";
             $headers .= 'From: WordPress Ultimate Blogroll <'.get_bloginfo('admin_email').'> '."\r\n";
             $subject = __("New link submitted at", "ultimate-blogroll")." ".home_url().''."\r\n";
            if(function_exists('wp_mail')):
                add_filter('wp_mail_charset',create_function('', 'return \''.get_option('blog_charset').'\'; '));
                wp_mail(UbMapper::getInstance(UbMapper::Settings)->getConfig("blogroll_contact"), $subject, $body, $headers);
            else:
                mail(UbMapper::getInstance(UbMapper::Settings)->getConfig("blogroll_contact"), $subject, $body, $headers);
            endif;

    Best regards
    S.

    http://wordpress.org/extend/plugins/ultimate-blogroll/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Send mails in UTF-8..’ is closed to new replies.
Skip to toolbar