Question #697175 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/697175
RaiMan proposed the following answer:
using the string format option mentioned by Manfred
def start_user(from, to):
print('sending mail to user')
mail_sending = """
powershell
$EmailFrom = %s
$EmailTo = %s
$Subject ="Try done"
$Body ="Content of body"
$SMTPServer ="smtp.server"
$SMTPClient = New-Object Net.Mail.SmtpClient($SMTPServer, 587)
$SMTPClient.EnableSsl = $true
$SMTPClient.Credentials = New-Object
System.Net.NetworkCredential("[email protected]","password");
$SMTPClient.Send($EmailFrom, $EmailTo, $Subject, $Body)
"""
returnCode = runScript(mail_sending % (from, to))
start_user("[email protected]", "[email protected]")
--
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.
_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help : https://help.launchpad.net/ListHelp