Search this site
Embedded Files
Spelldragon's IT
  • Welcome Spelldragons
    • News
    • Scripts
      • Script Powershell
        • Powershell : Addressed a mail
        • Powershell : Uninstall Powershell 1.0
        • Powershell : List details from extended files
        • Powershell : Add a Module
        • Powershell : Check local groups and members attached to it
        • Powershell : Check Des versions Mcafee
        • Powershell : Comment connaitre la version du Powershell ?
        • Powershell : creer un log simplement
      • Script Batch
        • Modification de l'hibernation
    • Common Sense
    • Infrastructure and Application
      • Citrix
        • Xendesktop
          • Check Attached User to Xendesktop Catalogs
          • Multisession Error on Connect to My PC
      • DNS
        • Add and delete DNS informations
      • WSUS
        • Re-Installer WSUS 3.0 SP2
        • WSUS : Accès à la base WSUS par Management Studio
    • Windows
Spelldragon's IT
  • Welcome Spelldragons
    • News
    • Scripts
      • Script Powershell
        • Powershell : Addressed a mail
        • Powershell : Uninstall Powershell 1.0
        • Powershell : List details from extended files
        • Powershell : Add a Module
        • Powershell : Check local groups and members attached to it
        • Powershell : Check Des versions Mcafee
        • Powershell : Comment connaitre la version du Powershell ?
        • Powershell : creer un log simplement
      • Script Batch
        • Modification de l'hibernation
    • Common Sense
    • Infrastructure and Application
      • Citrix
        • Xendesktop
          • Check Attached User to Xendesktop Catalogs
          • Multisession Error on Connect to My PC
      • DNS
        • Add and delete DNS informations
      • WSUS
        • Re-Installer WSUS 3.0 SP2
        • WSUS : Accès à la base WSUS par Management Studio
    • Windows
  • More
    • Welcome Spelldragons
      • News
      • Scripts
        • Script Powershell
          • Powershell : Addressed a mail
          • Powershell : Uninstall Powershell 1.0
          • Powershell : List details from extended files
          • Powershell : Add a Module
          • Powershell : Check local groups and members attached to it
          • Powershell : Check Des versions Mcafee
          • Powershell : Comment connaitre la version du Powershell ?
          • Powershell : creer un log simplement
        • Script Batch
          • Modification de l'hibernation
      • Common Sense
      • Infrastructure and Application
        • Citrix
          • Xendesktop
            • Check Attached User to Xendesktop Catalogs
            • Multisession Error on Connect to My PC
        • DNS
          • Add and delete DNS informations
        • WSUS
          • Re-Installer WSUS 3.0 SP2
          • WSUS : Accès à la base WSUS par Management Studio
      • Windows

Powershell : Adress a mail

Addressed a mail into a  Powershell script could be useful  to forward some logs or other informations needed for a administration team or management team.

See below example  whithout attached file :
Have a look and try to adapt it for your needs.
Make a script with simple sentence and clear message to communicate. 


$smtpserver = "SMTP server existing in your work environnement (use alias or fqdn)"
$destination = "administrator@admin.com"
$smtp = New-Object Net.Mail.SmtpClient($smtpserver)
$emailFrom = "address@admin.com"
$subject = "Subeject of your Message"
$body = "Add your message and some variables if needed."
$smtp.send($emailFrom,$user,$subject,$body)

Google Sites
Report abuse
Page details
Page updated
Google Sites
Report abuse