Return-Path: X-Original-To: apmail-commons-user-archive@www.apache.org Delivered-To: apmail-commons-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 358B4185FE for ; Wed, 23 Mar 2016 11:24:11 +0000 (UTC) Received: (qmail 57031 invoked by uid 500); 23 Mar 2016 11:24:10 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 56921 invoked by uid 500); 23 Mar 2016 11:24:10 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 56904 invoked by uid 99); 23 Mar 2016 11:24:09 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Mar 2016 11:24:09 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 2D41418021C for ; Wed, 23 Mar 2016 11:24:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.198 X-Spam-Level: ** X-Spam-Status: No, score=2.198 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_REPLY=1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id SbBchEtDhGBx for ; Wed, 23 Mar 2016 11:24:07 +0000 (UTC) Received: from mail-io0-f179.google.com (mail-io0-f179.google.com [209.85.223.179]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 28ACE5F23A for ; Wed, 23 Mar 2016 11:24:06 +0000 (UTC) Received: by mail-io0-f179.google.com with SMTP id c63so33642373iof.0 for ; Wed, 23 Mar 2016 04:24:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=x/8H41zgwyKCHbAG3qqXQ6HaM/V7MFX5yNsV8ZNItk8=; b=o9VSrSzR2HzQL+6f8DTMo3v3GNLPXQB/2LBsrkywgdGLgNeSKZbsnhVUmEg1bhNJWM Z7ppS0u3pnS/xdxrQjR8dKNloAnU0DmnHcyZ0XiUrnrpkDyRoBgS8X3aAPWIzNUh4y8R RVxI0WP/HiVWkdh6kpfT9am45TXoCLgoG/DYtI3qf9KCEat4C9FTINrkzm7Q5U4etOCP YxSjr0GeJ3p+wr4jG3Qber/Cd0+bP7YMGUQ392IJc36J3L9far/mNLAMoUQunX9ZoMO1 LNwLX7hvDK/AQpkrbqZ68wJWPYdhBormYKgaT/CHuBLL7pbtnzO7eaSoxTzBL/Hx6xYV 4UGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=x/8H41zgwyKCHbAG3qqXQ6HaM/V7MFX5yNsV8ZNItk8=; b=I+IEMMVYcH8yKWJz9fj5oGiZ5XRb+cEZbT3+mulZip7cp6ob844q7JbQd1RPeV9EtC RCFegzFmLWe75quk+CbhoaY90AXWCtI2JIN8NpgzHm+GCejI76iuMq7nneiTwp2bdK2i xhmMJVwWzlELehtDTctdOhFSCxQL5uduwRbirDAlOY+peMBCqQrx3zdDaJhtJ4VNInLK WwMmXD+UEHVwivUO++ON7IzAn0tCjV7dFPwPlwmekp4p3d6HpHkfOgcY2FIfQSdto/Rg U9lz9hgZ6FPAkyMiqUPmMWhRmN3EFW6/q2AY03G2EyEGjk0xZW0vBUP0gWHUCnOl9XZ0 9GhQ== X-Gm-Message-State: AD7BkJKQBcH0OX23OFUI/3GsqdvzhwqfP3rR6hOLKBMEq4+xC2Y9SZaw8yZgNzq/HnEkqWEwGLlHRhUAd8QKZw== X-Received: by 10.107.167.69 with SMTP id q66mr2731658ioe.20.1458732226629; Wed, 23 Mar 2016 04:23:46 -0700 (PDT) MIME-Version: 1.0 References: <7908D6F51D5A62409851E6F7AF25AC6541C58C@exmb02tsivz2.tcad.telia.se> <7908D6F51D5A62409851E6F7AF25AC6541C5B2@exmb02tsivz2.tcad.telia.se> In-Reply-To: <7908D6F51D5A62409851E6F7AF25AC6541C5B2@exmb02tsivz2.tcad.telia.se> From: Maria Jimena Sanchez Date: Wed, 23 Mar 2016 11:23:36 +0000 Message-ID: Subject: =?UTF-8?Q?Re=3A_Problems_with_encoding_UTF=2D8_for_=C3=A5=C3=A4=C3=B6?= To: Commons Users List Content-Type: multipart/alternative; boundary=001a1141be3030d47b052eb59078 --001a1141be3030d47b052eb59078 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Are you using the correct UTF-8 symbol? We still can't see how you assign content to the subject variable On Wed, Mar 23, 2016, 8:17 AM wrote: > Hi > I have the problem on Hotmail.com i attach the complete method. > > > private void sendEmail(String sender, String recipient, String > subject, > String body) throws IOException { > String server; > List ccList =3D new ArrayList(); > Writer writer; > SimpleSMTPHeader header; > SMTPClient client; > > header =3D new SimpleSMTPHeader(sender, recipient, subjec= t); > header.addHeaderField("Content-Type", "text/plain; > charset=3D" + "UTF-8"); > client =3D new SMTPClient("UTF-8"); > client.connect(server); > > client.login(); > > client.setSender(sender); > client.addRecipient(recipient); > > for (String recpt : ccList) { > client.addRecipient(recpt); > } > > writer =3D client.sendMessageData(); > > if (writer !=3D null) { > writer.write(header.toString()); > writer.write(body); > writer.close(); > client.completePendingCommand(); > } > > client.logout(); > client.disconnect(); > } > > > --- > Lars Carlsson > Phone: +46702507901 > ________________________________________ > From: sebb [sebbaz@gmail.com] > Sent: Wednesday, March 23, 2016 11:39 AM > To: Commons Users List > Subject: Re: Problems with encoding UTF-8 for =C3=A5=C3=A4=C3=B6 > > On 23 March 2016 at 10:20, wrote: > > Hi > > What software are you having a problem with? > This list applies to multiple components. > > > I have a problem that some mail clients show the wrong encoding for > Swedish characters (=C3=A5=C3=A4=C3=B6). I try setting the message encodi= ng to UTF-8 but > it did't work i most have forgot something in the code. > > If you see any anything wrong in the code. > > The code does not show how the subject variable is created. > > > > > > > Java code: > > ---------------------------------- > > header.addHeaderField("Content-Type", "text/plain; charset=3D" + "UTF-8= "); > > client =3D new SMTPClient("UTF-8"); > > client.connect(server); > > > > client.login(); > > > > client.setSender(sender); > > client.addRecipient(recipient); > > > > for (String recpt : ccList) { > > client.addRecipient(recpt); > > } > > > > writer =3D client.sendMessageData(); > > > > if (writer !=3D null) { > > writer.write(header.toString()); > > writer.write(body); > > writer.close(); > > client.completePendingCommand(); > > } > > > > client.logout(); > > client.disconnect(); > > > > > > Raw message in Thunderbird using source view: > > > -------------------------------------------------------------------------= --------------- > > Content-Type: text/plain; charset=3D"UTF-8" > > > > Subject: =C3=83=C2=A4=C3=83=C2=A5=C3=83=C2=B6 > > .... > > X-STA-Spam: subject:?????? ?????? spec:disguised to:2**0 header:To:1 > > X-BTI-AntiSpam: > score:0,sta:7/030,dnsbl:off,sw:off,bsn:none,spf:off,bsctr:off,dk:off,pbmf= :none,ipr:0/3,trusted:yes,ts:no,bs:no,ubl:off > > Received-SPF: none > > .... > > MIME-Version: 1.0 > > > > > > =C3=83=C2=A5=C3=83=C2=A4=C3=83=C2=B6 > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org > > For additional commands, e-mail: user-help@commons.apache.org > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org > For additional commands, e-mail: user-help@commons.apache.org > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org > For additional commands, e-mail: user-help@commons.apache.org > > --001a1141be3030d47b052eb59078--