dcsimg
How to send mail in all languages?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Siim_Karu
Posted On:   Sunday, April 6, 2003 11:59 PM

Hi! I want to write email sending program where for example user inputs cyrillic, arabic or something else strange characters and I can read these letters (with Lotus Notes) so that all characters are outputed correctly(no dots or strange symbols). How must I make encoding/decoding in sending mail? I use code like this but there are still 'strange symbols': Properties props = System.getProperties(); props.put("mail.smtp.host", host); Session session = Session.getInstance(props, null); MimeMessage message = new MimeMessage(session); message.setFrom(new InternetAddress(from)); message.addRecipient(Message.RecipientType   More>>

Hi! I want to write email sending program where for
example user inputs cyrillic, arabic or something else
strange characters and I can read these letters

(with Lotus Notes) so that all characters are

outputed correctly(no dots or strange symbols). How

must I make encoding/decoding in sending mail? I use
code like this but there are still 'strange symbols':

Properties props = System.getProperties();

props.put("mail.smtp.host", host);

Session session = Session.getInstance(props, null);

MimeMessage message = new MimeMessage(session);

message.setFrom(new InternetAddress(from));

message.addRecipient(Message.RecipientType.TO, new InternetAddress(mailto));

message.setSubject(subject);

Multipart multipart = new MimeMultipart();

MimeBodyPart messageBodyPart = new MimeBodyPart();

messageBodyPart.setText(messagetext, "UTF-8");

multipart.addBodyPart(messageBodyPart);

message.setContent(multipart);

Transport.send( message );

   <<Less

Re: How to send mail in all languages?

Posted By:   Siim_Karu  
Posted On:   Monday, April 7, 2003 04:20 AM

Or if I use statement shown in previous question/answers:
msg.setContent(message,"text/html;charset="UTF-8"");
then question arises what objects are 'msg' and 'message'?
Is 'msg' MimeMessage and 'message' Multipart?
About | Sitemap | Contact