没有收到通过 sendgrid 发送的邮件

问题描述

我正在使用 sendgrid api 密钥向用户发送邮件。 我正在邮件中附上日历以邀请人们。当我使用亚洲/东京时区和美国/温哥华时区时,人们收到了邀请。

以下是日历构建器代码

if (emailType?.equalsIgnoreCase(AppConstant.EMAIL_TYPE_CONFIRM)) {
        builder.calendar() {
            events {
                event(

                        start: Date.parse('yyyy-MM-dd HH:mm',icsstartDateTime),end: Date.parse('yyyy-MM-dd HH:mm',icsEndDateTime),summary: summary,timezone: appointmentDetails.timeZone,location: appointmentDetails.venue
                ) {
                    reminder(minutesBefore: 30,description: summary)
                }
            }
        }
    } else if (emailType.equalsIgnoreCase(AppConstant.EMAIL_TYPE_CANCEL) && (attachment != null)) {

 builder.calendar(method: 'CANCEL') {
            events {
                event(
                        start: Date.parse('yyyy-MM-dd HH:mm',sequence: 12,//It is a random number; should be greater than the sequence in the ICS file selected for cancellation
                        uid: UID,location: appointmentDetails.venue,method: 'CANCEL',status: 'CANCELLED'
                )
            }

现在当我使用 America/Chicago 作为时区时,我在控制台中收到 202 响应代码

       Request request = new Request()
       request.with {
            method = Method.POST
            endpoint = "mail/send"
            body = mail.build() }
      Response response = sg.api(request)
      System.out.println(response.getStatusCode());

用户收不到邮件

可能的原因是什么?

谢谢

苏汉姆

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)