js通过插件发送邮件

这个插件为SmtpJS

官网地址为  https://www.smtpjs.com/

方法很简单

<script src="https://smtpjs.com/v2/smtp.js">
</script>


Email.send(
"from@you.com", "to@them.com", "This is a subject", "this is the body", "smtp.yourisp.com", "username", "password"
);
     Email.send("businesssmtp@ruichenghealth.com",
            "businesssmtp@ruichenghealth.com",
            "官网通知邮件",
            body,
            { 
                token:token,
                callback: function done(message) { 
                   
                  
                }  
            }
        );

 

生成token

posted on 2018-11-28 18:45  weblsy  阅读(4048)  评论(0)    收藏  举报