<script language="javascript" type="text/javascript">
var numbers = []
function getRandomArbitrary(0, 100 000) {
return Math.random() * (100 000 - 0) + 0;
}
numbers.push(getElementById(getRandomArbitrary))
function SendMail(){
try
{
// create a session and log on -- username and password in profile
var refMsg = WScript.CreateObject("CDO.Message");
var refConf = WScript.CreateObject("CDO.Configuration");
// Setting configuration params
with(refConf.Fields)
{
Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.mail.ru";
Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2;
Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1;
Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "***@mail.ru";
Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "Тут типо пароль";
}
refConf.Fields.Update();
with(refMsg)
{
Configuration = refConf;
To = getElementByID(email);
From = "odrovunos@gmail.com";
Subject = "код верификации";
TextBody = "Укажите пожалуйста на данной странице www.page.com код верификации (getElementByID(getRandomArbitrary))";
}
refMsg.Send();
}
catch(e)
{
WScript.Echo("SendMail error !!! : " + e.description);
WScript.Quit(1);
}
}
</script>
<form action="handler.php">
<td align="center"><h3>Форма для заполнения</h3>
<form method="post" action="submit.php">
<p><input type="text" size="40" placeholder="Ваше имя" name="user"></p>
<p><input type="text" size="40" placeholder="Телефон" name="tel"></p>
<p><input id ="email"type="text" size="40" placeholder="E-mail" name="email"></p>
<p><input type="submit" value="Получить"></p>
</form>
<input type="button" value="Отправить" name="rbtest" onClick="SendMail()"> |