简体   繁体   中英

SMTPJS script doesn't seem to work

I am tired of writing php scripts so I am trying to work with www.smtpjs.com .

I included the script in the index.html:

<script src="js/smtp.js"></script>

and this is my js code:

Email.send("contact@maky.biz", //from
           data.email, //to
           "Demande de devis depuis bla.com",
           "avec smtp.gmail.com", 
           "smtp.gmail.com",
           "me@gmail.com",
           "mypass");

Should I configure something more to make this work?

A bit late, but it might be useful for future readers...

smtp.google.com listens on port 465 but the default configuration of the smtp.js service is over port 25. You might want to try to encrypt the SMTP settings in a security token as mentioned on the smtp.js homepage :

By default, the SMTP connection is secure (STARTTLS) and over port 25. If you need to use an SMTP server that does not accepts secure connections, or in on a non-standart port, like 587, then use the button above "Encrypt your SMTP Credentials" to store advanced configuration.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM