Skip to content

Latest commit

 

History

History

Communication

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Communication

  • Send-SRMail.ps1

    Sends an e-mail message
    You can use the script as a function script. The script must be tagged _Lib_ for this purpose.
    To load the script into the Powershell session automatically, it should be included in the PowerShell options of the action. Not all parameters are necessary.
    You can also work with a variable in the main script.

    Example 1 for calling the SendMail function in your main script:
    SendMail '[email protected]>' '[email protected]>' 'My subject' 'Body text' $true 'Normal' 'smtp.fabrikam.com'

    Example 2 for calling the SendMail function in your main script:
    SendMail -MailSender '[email protected]' -MailRecipients '[email protected],[email protected]' -MailSubject 'My subject' -MailBody 'Body text' -MailUseSsL $true -MailPriority 'Normal' -MailServer 'smtp.fabrikam.com'

    Example 3 for calling the SendMail function in your main script:
    $sender = '[email protected]'
    $receipient = '[email protected]'
    $subject = 'MysubjectText'
    $mailhost = 'smtp.example.com'
    SendMail $sender $receipient $subject 'Mybodytext' $mailhost