@ -117,6 +117,8 @@ public class MailUtils {
email . setSmtpPort ( mailServerPort ) ;
email . setSmtpPort ( mailServerPort ) ;
//set charset
//set charset
email . setCharset ( Constants . UTF_8 ) ;
email . setCharset ( Constants . UTF_8 ) ;
// TLS verification
email . setTLS ( true ) ;
if ( CollectionUtils . isNotEmpty ( receivers ) ) {
if ( CollectionUtils . isNotEmpty ( receivers ) ) {
// receivers mail
// receivers mail
for ( String receiver : receivers ) {
for ( String receiver : receivers ) {
@ -267,6 +269,7 @@ public class MailUtils {
props . setProperty ( Constants . MAIL_HOST , mailServerHost ) ;
props . setProperty ( Constants . MAIL_HOST , mailServerHost ) ;
props . setProperty ( Constants . MAIL_SMTP_AUTH , Constants . STRING_TRUE ) ;
props . setProperty ( Constants . MAIL_SMTP_AUTH , Constants . STRING_TRUE ) ;
props . setProperty ( Constants . MAIL_TRANSPORT_PROTOCOL , mailProtocol ) ;
props . setProperty ( Constants . MAIL_TRANSPORT_PROTOCOL , mailProtocol ) ;
props . setProperty ( Constants . MAIL_SMTP_STARTTLS_ENABLE , Constants . STRING_TRUE ) ;
Authenticator auth = new Authenticator ( ) {
Authenticator auth = new Authenticator ( ) {
@Override
@Override
protected PasswordAuthentication getPasswordAuthentication ( ) {
protected PasswordAuthentication getPasswordAuthentication ( ) {