公司網站沒有用到數據庫什么的,也沒用建站工具,
現在需要,收集客戶填寫的信息,發郵件,只能用前台發郵件了,所以找到了Smtp.js
- 1. Include the script:
<script src="https://smtpjs.com/v3/smtp.js"> </script>
- 2. Send an email using:
Email.send({ Host : "smtp.yourisp.com", Username : "username", Password : "password", To : 'them@website.com', From : "you@isp.com", Subject : "This is the subject", Body : "And this is the body" }).then( message => alert(message) );
這種輸入明文密碼的是肯定不安全的,同時也提供的SecureToken 方式
Email.send({ SecureToken : "C973D7AD-F097-4B95-91F4-40ABC5567812", To : 'them@website.com', From : "you@isp.com", Subject : "This is the subject", Body : "And this is the body" }).then( message => alert(message) );
其實這種也不安全,別人雖然不知道密碼了,但是可以用你的賬號發垃圾郵件啊