Revision 39953
Added by Nikon Gasparis almost 9 years ago
modules/uoa-utils/trunk/src/main/java/eu/dnetlib/utils/MailLibrary.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import java.util.Properties; |
4 | 4 |
|
5 |
import javax.mail.Message; |
|
6 | 5 |
import javax.mail.MessagingException; |
7 | 6 |
import javax.mail.PasswordAuthentication; |
8 | 7 |
import javax.mail.Session; |
... | ... | |
57 | 56 |
|
58 | 57 |
session.setDebug(debug); |
59 | 58 |
|
60 |
Message msg = new MimeMessage(session); |
|
59 |
MimeMessage msg = new MimeMessage(session);
|
|
61 | 60 |
|
62 | 61 |
msg.setFrom(new InternetAddress(this.from)); |
63 | 62 |
msg.setReplyTo(new InternetAddress[] { new InternetAddress(replyTo) }); |
64 |
msg.setSubject(subject); |
|
63 |
msg.setSubject(subject, "UTF8");
|
|
65 | 64 |
msg.setContent(text, "text/plain; charset=UTF-8"); |
66 | 65 |
|
67 | 66 |
for (String recipient : recipients) |
modules/uoa-utils/trunk/pom.xml | ||
---|---|---|
48 | 48 |
<dependency> |
49 | 49 |
<groupId>eu.dnetlib</groupId> |
50 | 50 |
<artifactId>uoa-api</artifactId> |
51 |
<version>[1.1.0, 1.2.0)</version>
|
|
51 |
<version>[1.1.0, 1.2.0-SNAPSHOT]</version>
|
|
52 | 52 |
</dependency> |
53 | 53 |
<dependency> |
54 | 54 |
<groupId>eu.dnetlib</groupId> |
55 | 55 |
<artifactId>uoa-domain</artifactId> |
56 |
<version>[1.1.0, 1.2.0)</version>
|
|
56 |
<version>[1.1.0, 1.2.0-SNAPSHOT]</version>
|
|
57 | 57 |
</dependency> |
58 | 58 |
</dependencies> |
59 | 59 |
</project> |
Also available in: Unified diff
updated MailLibrary to use utf-8 encoding in subject