Posted By:
Didde_Brockman
Posted On:
Sunday, November 24, 2002 06:29 AM
I am trying to send a HTML formatted e-mail with the code below. No matter what I do I just cannot seem to get certain swedish characters to work at all. I even tried replacing the Å, Ö and Ä with å, ö and ä but the e-mail still parses them as "Â" and so on. Completely off. What am I missing here, anyone? Properties props = new Properties(); props.put("mail.host", host); Session session = Session.getDefaultInstance(props, null); Message message = new MimeMessage(session); message.setFrom(InternetAddress.parse(from)[0]); message.setSubject(subject); message.setSentDate(new java.util.Date()); message.addRecipients(Message.RecipientType.
More>>
I am trying to send a HTML formatted e-mail with the code below. No matter what I do I just cannot seem to get certain swedish characters to work at all.
I even tried replacing the Å, Ö and Ä with å, ö and ä but the e-mail still parses them as "Â" and so on. Completely off.
What am I missing here, anyone?
Properties props = new Properties();
props.put("mail.host", host);
Session session = Session.getDefaultInstance(props, null);
Message message = new MimeMessage(session);
message.setFrom(InternetAddress.parse(from)[0]);
message.setSubject(subject);
message.setSentDate(new java.util.Date());
message.addRecipients(Message.RecipientType.TO, InternetAddress.parse(to));
message.setContent(body, contenttype);
Transport.send(message);
<<Less