SMTPJS script doesn't seem to work

I'm tired of writing php scripts, so I'm trying to work with www.smtpjs.com .

I included the script in 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"); 

Do I have to set up something else to make this work?

+6
source share
1 answer

A little late, but it may be useful for future readers ...

smtp.google.com listens on port 465, but the default smtp.js configuration is on port 25. You might want to encrypt the SMTP settings in the security token, as indicated on the smtp.js main page:

By default, the SMTP connection is secure (STARTTLS) and above port 25. If you need to use an SMTP server that does not accept secure connections, or in a non-standard port, for example 587, use the button "Encrypt your SMTP credentials" above to store the advanced configuration .

0
source

Source: https://habr.com/ru/post/1014067/


All Articles