Skip to main content
Nintex Community Menu Bar

Send a Test Email From Your Kryon Studio Server Using Powershell

  • August 31, 2022
  • 0 replies
  • 47 views

MillaZ
Nintex Employee
Forum|alt.badge.img+23
Product: Kryon RPA
Product Version: N/A
Components: Kryon Studio
You can use this script/command set to send an email directly from Powershell to your SSL-enabled email inbox, allowing you to troubleshoot network connection issues and authentication problems with the Send Email advanced command.

Prerequisites: None.
 
Steps:
Simply fill in the required data in the first 6 lines, then paste into a Powershell window and hit Enter.
If you encounter an error you can more easily troubleshoot the issue outside of Kryon Studio.
 
$SMTPServer = "<SMTP Server Address>" $SMTPPort = "<SMTP Port>" $SMTPUser = "<SMTP USername>" $SMTPPassword = "<SMTP Password>" $EmailTo = "<Email To>" $EmailFrom = "<Email From>" $Subject = "Email notification test" $Body = "This is a test email notification from your operating system" $SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer, $SMTPPort) $SMTPClient.EnableSsl = $true $SMTPClient.Credentials = New-Object System.Net.NetworkCredential($SMTPUser, $SMTPPassword); $SMTPClient.Send($EmailFrom, $EmailTo, $Subject, $Body)

Here is an example of the script with the required variables filled in:
 
$SMTPServer = "smtp.gmail.com" $SMTPPort = "587" $SMTPUser = "kryontest" $SMTPPassword = "Test12345" $EmailTo = "kryontest@gmail.com" $EmailFrom = "email@emailtest.com" $Subject = "Email notification test" $Body = "This is a test email notification from your operating system" $SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer, $SMTPPort) $SMTPClient.EnableSsl = $true $SMTPClient.Credentials = New-Object System.Net.NetworkCredential($SMTPUser, $SMTPPassword); $SMTPClient.Send($EmailFrom, $EmailTo, $Subject, $Body)​