update 优化 移除不合理的方法 携带附件的邮件建议直接集成插件发送

2.X
疯狂的狮子Li 1 year ago
parent ef2294a9c4
commit b0dac358f7

@ -2,9 +2,6 @@ package org.dromara.resource.api;
import org.dromara.common.core.exception.ServiceException;
import java.io.File;
import java.util.List;
/**
*
*
@ -21,14 +18,4 @@ public interface RemoteMailService {
*/
void send(String to, String subject, String text) throws ServiceException;
/**
*
*
* @param to
* @param subject
* @param text
* @param fileList
*/
void sendWithAttachment(String to, String subject, String text, List<File> fileList) throws ServiceException;
}

@ -1,17 +1,13 @@
package org.dromara.resource.dubbo;
import cn.hutool.core.util.ArrayUtil;
import org.dromara.common.core.exception.ServiceException;
import org.dromara.common.mail.utils.MailUtils;
import org.dromara.resource.api.RemoteMailService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.dromara.common.core.exception.ServiceException;
import org.dromara.common.mail.utils.MailUtils;
import org.dromara.resource.api.RemoteMailService;
import org.springframework.stereotype.Service;
import java.io.File;
import java.util.List;
/**
*
*
@ -34,16 +30,4 @@ public class RemoteMailServiceImpl implements RemoteMailService {
MailUtils.sendText(to, subject, text);
}
/**
*
*
* @param to
* @param subject
* @param text
* @param fileList
*/
public void sendWithAttachment(String to, String subject, String text, List<File> fileList) throws ServiceException {
MailUtils.sendText(to, subject, text, ArrayUtil.toArray(fileList, File.class));
}
}

Loading…
Cancel
Save