Přidat otázku mezi oblíbenéZasílat nové odpovědi e-mailem Prosím o kontrolu scriptu

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script src="https://smtpjs.com/v3/smtp.js"></script>
<script type="text/javascript">
function sendEmail() {
Email.send({
Host: "smtp.seznam.cz",
Username :'barmv@seznam.cz',
Password : "***********",
To : document.getElementById("TO").value,
From : "barmv@seznam.cz",
Subject : document.getElementById("SUBJECT").value,
Body : document.getElementById("BODY").value,
})
.then(function(message){
alert("mail sent successfully")
});
}
</script>
</head>
<body>
<form method="post">
TO: <input type="text" id="TO" value=""/><br>
SUBJECT: <input type="text" id="SUBJECT" value=""/><br>
BODY: <input type="text" id="BODY" value=""/><br>
<input type="button" value="Send Email" onclick="sendEmail()"/>
</form>
</body>
</html>

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script src="https://smtpjs.com/v3/smtp.js"></script>
<script type="text/javascript">
function sendEmail() {
Email.send({
Host: "smtp.seznam.cz",
Username : "barmv@seznam.cz",
Password : "************",
To : 'barveramartin@gmail.com',
From : "barmv@seznam.cz",
Subject : "zkouška",
Body : "Pokusný email html",
})
.then(function(message){
alert("mail sent successfully")
});
}
</script>
</head>
<body>
<form method="post">
<input type="button" value="Send Email" onclick="sendEmail()"/>
</form>
</body>
</html>

Po odeslání mi přijde hláška, že email byl úspěšně odeslán, ale žádná zpráva mi nepřijde. Kde je ve scriptu chyba? Heslo zadává správně!!!

Děkuji předem za odpověď.
Magistr

Odstraněno heslo k účtu, tohle není normální (Kurt)

Předmět Autor Datum
Note: By default, the SMTP connection is secure (STARTTLS) and over port 25. If you need to use an S…
Wikan 09.03.2020 11:31
Wikan
Ale kam mám Port : 465 ve scriptu umístit? Děkuji Magistr
Magistr 09.03.2020 13:52
Magistr
Je to vykopírované ze stránky výrobce. Tam je i návod. poslední
Wikan 09.03.2020 17:56
Wikan

Note: 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-standard port, like 587, then use the button above "Encrypt your SMTP Credentials" to store advanced configuration.

smtp.seznam.cz používá port 465.

Zpět do poradny Odpovědět na původní otázku Nahoru