1

我的应用程序从我的节点服务器发送带有AWS SES的电子邮件,并且我的所有电子邮件一直在 Gmail 的 Promotions Tab 中结束

如何让我的电子邮件最终出现在 Gmail 的主要选项卡中?

基本上,我的电子邮件是一个简单的“确认您的电子邮件帐户”电子邮件,在他/她在我的网站上提交注册信息后发送给用户。用户必须单击此电子邮件中的链接以确认他的电子邮件,并且将在我的网站上创建他的帐户。请参阅下文,了解我是如何在 Node.js 上制作电子邮件的。

我已经尝试过,但最终还是出现在促销标签中:

  1. 我意识到如果我输入“点击链接”之类的短语,我最终会进入促销活动。但即使我用下面的“打开一次性使用链接”替换了那个短语,我仍然会进入促销活动。
  2. 我避免了花哨的 html
  3. 没有图片
  4. 我什至将 noreply@mywebsite.com 替换为 somepersonname@mywebsite.com(例如 jerry@mywebsite.com),它仍然会出现在促销活动中!

我在某处阅读以完全避免使用 HTML 来欺骗 Gmail 过滤器,使其认为它是由人类编写的。但是我怎么能用 aws.ses 做到这一点?这是解药吗?

我很确定很多人都面临过这是一个问题。我的用户一直告诉我,他们实际上没有收到确认电子邮件,而实际上它已出现在他们的“促销”标签中。请帮忙!任何想法将不胜感激。谢谢你。

// CREATE THE HTML
const html = `
      <!doctype html>
      <html>
        <head>
          <meta charset="utf-8">
        </head>
        <body>
          <div >
            <p>Hello John!</p>
            <p>Please open the one-time-use link below to confirm your email.</p>

            <div >
              <a href=https://mywebsite.com>Confirm Email</a>
            </div>

            <p>Not expecting this email? Please disregard this message.</p>

            <p>Thank you</p>

          </div>
        </body>
      </html>
`


// CREATE PARAMS FOR SES
const params = {
      Destination: {
        BccAddresses: [], 
        CcAddresses: [], 
        ToAddresses: ["john@gmail.com"],
      },
      Message: {
        Body: {
          Html: {
            Charset: "UTF-8", 
            Data: html
          }, 
          Text: {
            Charset: "UTF-8", 
            Data: text
          }
        }, 
        Subject: {
          Charset: "UTF-8", 
          Data: `mywebsite: Confirm New Account k`, // Subject line
        }
      }, 
      ReplyToAddresses: [], 
      Source: `"mywebsite" <noreply@mywebsite.com>`, // sender address
  }


  //SEND OUT EMAIL
  ses.sendEmail(params, function(err, data) {
      if (err) {
        console.log(err, err.stack); // an error occurred
        returnFunc(err); // return END of func fail
      } else {
        console.log(data);           // successful response
        returnFunc(null, data); // return END of func success
      }
      */
  });
  
  

4

0 回答 0