Send email: Difference between revisions

no edit summary
m (→‎{{header|REXX}}: added a comment to the REXX section header.)
No edit summary
Line 982:
Protocols.SMTP.Client()->simple_mail(to,subject,from,msg);
}</lang>
 
=={{header|PowerShell}}==
PowerShell has a cmdlet named 'Send-MailMessage', and this is the easiest way to use it.
 
The parameters are splatted with a hashtable:
<lang PowerShell>
[hashtable]$mailMessage = @{
From = "weirdBoy@gmail.com"
To = "anudderBoy@YourDomain.com"
Cc = "daWaghBoss@YourDomain.com"
Attachment = "C:\temp\Waggghhhh!_plan.txt"
Subject = "Waggghhhh!"
Body = "Wagggghhhhhh!"
SMTPServer = "smtp.gmail.com"
SMTPPort = "587"
UseSsl = $true
ErrorAction = "SilentlyContinue"
}
 
Send-MailMessage @mailMessage
</lang>
 
=={{header|PureBasic}}==
308

edits