Answer the question
In order to leave comments, you need to log in
Problem with Russian words in VBS script?
Hello. There was a problem with the Russian words used in the script.
The code:
Option explicit
Dim oShell, Site, FromMail, ToMail, Subject, Message, Sender
Site = "1is.ru"
FromMail = "[email protected]"
ToMail = "[email protected]"
Subject = "Тест!"
Sender = "First Site"
Message = "Message!"
set oShell= Wscript.CreateObject("WScript.Shell")
oShell.Run "telnet mx.yandex.ru 25"
WScript.Sleep 100
oShell.Sendkeys "helo "+(Site)
oShell.SendKeys "{ENTER}"
WScript.Sleep 100
oShell.Sendkeys "mail from:"+(FromMail)
oShell.SendKeys "{ENTER}"
WScript.Sleep 100
oShell.Sendkeys "rcpt to:"+(ToMail)
oShell.SendKeys "{ENTER}"
WScript.Sleep 100
oShell.Sendkeys "data"
oShell.SendKeys "{ENTER}"
WScript.Sleep 100
oShell.Sendkeys "from: "+(Sender)+" <"+(FromMail)+">"
oShell.SendKeys "{ENTER}"
oShell.Sendkeys "to: "+(ToMail)
oShell.SendKeys "{ENTER}"
oShell.Sendkeys "subject: "+(Subject)
oShell.SendKeys "{ENTER}"
oShell.SendKeys "{ENTER}"
oShell.Sendkeys (Message)
oShell.SendKeys "{ENTER}"
oShell.Sendkeys "."
oShell.SendKeys "{ENTER}"
WScript.Sleep 1000
oShell.SendKeys "quit"
oShell.SendKeys "{ENTER}"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question