...
|
...
|
@@ -2,6 +2,7 @@ package com.yohoufo.order.utils; |
|
|
|
|
|
import com.google.common.collect.Lists;
|
|
|
import lombok.Builder;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
import javax.activation.DataHandler;
|
|
|
import javax.activation.DataSource;
|
...
|
...
|
@@ -15,6 +16,7 @@ import java.io.IOException; |
|
|
import java.util.List;
|
|
|
import java.util.Properties;
|
|
|
|
|
|
@Slf4j
|
|
|
public class MailSender {
|
|
|
|
|
|
private Properties properties;
|
...
|
...
|
@@ -107,7 +109,7 @@ public class MailSender { |
|
|
attachmentBodyPart.setDataHandler(dataHandler);
|
|
|
attachmentBodyPart.setFileName(MimeUtility.encodeText(attachment.filename));
|
|
|
} catch (MessagingException | IOException e) {
|
|
|
|
|
|
log.warn("send mail attachment fail, to is {} filename is {}", to, attachment.filename);
|
|
|
}
|
|
|
});
|
|
|
|
...
|
...
|
|