passing string to shell using runscript
Hey 😄
I am trying to send a mail using this code:
def start_user():
print('sending mail to user')
mail_sending = """
powershell
$EmailFrom = "<email address hidden>"
$EmailTo = "<email address hidden>"
$Subject ="Try done"
$Body ="Content of body"
$SMTPServer ="smtp.server"
$SMTPClient = New-Object Net.Mail.
$SMTPClient
$SMTPClient
$SMTPClient
"""
returnCode = runScript(
it is working fine, using the right content.
But even after hours of research I can't find a way to insert the fields using variables of my script:
MyMail = <email address hidden>
email = <email address hidden>
and so on for
def start_user():
print('sending mail to user')
mail_sending = """
powershell
$EmailFrom = str(MyMail)
$EmailTo = str(email)
...
anyone can help me?
thx
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Ben Dix for more information if necessary.