How can i implement “clicks” and “opend” events in aws ses smtp send mail using node js?

笑着哭i 提交于 2020-01-25 06:57:16

问题


Using this code I have to send out emails. I am using AWS smtpTransport, how can I implement "opens" and "clicked" events in my code? Please help me find a solution?

 var nodemailer = require('nodemailer');
    var smtpTransport = require('nodemailer-smtp-transport');

    var transport = nodemailer.createTransport(smtpTransport({
      host: 'email.amazonaws.com',
      port: 465,
      secure: true,
      auth: {
        user: 'akd',
        pass: 'BNf'
      }
    }));

    var mailOptions = {
      from: 'samplet213@gmail.com', // sender address
      to: 'mee@gmail.com', // list of receivers
      subject: 'Hello', // Subject line
      text: 'Hello world', // plaintext body
      html: '<b>Hello world</b>' // html body
    };

    transport.sendMail(mailOptions, function(error, info) {
      if (error) {
        console.log(error);
      }
      else{
        console.log('Message sent: ' + info.response);
      }
    });

来源:https://stackoverflow.com/questions/58852767/how-can-i-implement-clicks-and-opend-events-in-aws-ses-smtp-send-mail-using

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!