添加判断,确认邮件是否发送成功
This commit is contained in:
@@ -840,7 +840,7 @@ public class SendEmailUtil {
|
||||
private final static Long PAYMENT_FAILED_RENEWAL_USER_EN = 131563L;
|
||||
private final static Long PAYMENT_FAILED_RENEWAL_USER_CN = 131564L;
|
||||
|
||||
public static void subscriptionEmailReminder(String type, SubscriptionEmailParamsDTO subscriptionEmailParamsDTO, String language, String receiverAddress) {
|
||||
public static boolean subscriptionEmailReminder(String type, SubscriptionEmailParamsDTO subscriptionEmailParamsDTO, String language, String receiverAddress) {
|
||||
try {
|
||||
String merchantEmail = "kimwong@code-create.com.hk";
|
||||
String developer = "xupei3360@163.com";
|
||||
@@ -917,6 +917,7 @@ public class SendEmailUtil {
|
||||
break;
|
||||
default:
|
||||
log.error("unknown subscription email type");
|
||||
return false;
|
||||
// throw new BusinessException("unknown subscription email type");
|
||||
}
|
||||
|
||||
@@ -935,9 +936,11 @@ public class SendEmailUtil {
|
||||
SendEmailResponse respMerchant = client.SendEmail(merchant);
|
||||
log.info("邮件主题:{},发送结果toMerchant###{}", merchant.getSubject(), SendEmailResponse.toJsonString(respMerchant));
|
||||
}
|
||||
return true;
|
||||
} catch (TencentCloudSDKException e) {
|
||||
log.info("邮件发送失败###{}", e.toString());
|
||||
throw new BusinessException("failed.to.send.mail");
|
||||
return false;
|
||||
// throw new BusinessException("failed.to.send.mail");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user