Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
8 views
Powershell 1
Uploaded by
chashakib9
AI-enhanced title
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download now
Download
Save powershell 1 For Later
Download
Save
Save powershell 1 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
8 views
Powershell 1
Uploaded by
chashakib9
AI-enhanced title
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download now
Download
Save powershell 1 For Later
Carousel Previous
Carousel Next
Save
Save powershell 1 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 1
Search
Fullscreen
const std::string &PowerShellScript =
"Param( \r\n [String]$Att,\r\n [String]$Subj,\r\n "
"[String]$Body\r\n)\r\n\r\nFunction Send-EMail"
" {\r\n Param (\r\n [Parameter(`\r\n Mandatory=$true)]\r\n
"
"[String]$To,\r\n [Parameter(`\r\n Mandatory=$true)]\r\n
"
"[String]$From,\r\n [Parameter(`\r\n mandatory=$true)]\r\n
"
"[String]$Password,\r\n [Parameter(`\r\n Mandatory=$true)]\r\n
"
"[String]$Subject,\r\n [Parameter(`\r\n Mandatory=$true)]\r\n
"
"[String]$Body,\r\n [Parameter(`\r\n Mandatory=$true)]\r\n
"
"[String]$attachment\r\n )\r\n try\r\n {\r\n $Msg = New-
Object "
"System.Net.Mail.MailMessage($From, $To, $Subject, $Body)\r\n $Srv
= \"smtp.gmail.com\" "
"\r\n if ($attachment -ne $null) {\r\n try\r\n
{\r\n"
" $Attachments = $attachment -split (\"\\:\\:\");\r\n
"
" ForEach ($val in $Attachments)\r\n "
" {\r\n "
" $attch = New-Object System.Net.Mail.Attachment($val)\r\n
"
" $Msg.Attachments.Add($attch)\r\n }\r\n
"
"}\r\n catch\r\n {\r\n
exit 2; "
"\r\n }\r\n }\r\n "
" $Client = New-Object Net.Mail.SmtpClient($Srv, 587) #587 port for
smtp.gmail.com SSL\r\n "
" $Client.EnableSsl = $true \r\n $Client.Credentials = New-
Object "
"System.Net.NetworkCredential($From.Split(\"@\")[0], $Password); \r\n
$Client.Send($Msg)\r\n "
" Remove-Variable -Name Client\r\n Remove-Variable -Name
Password\r\n "
"exit 7; \r\n }\r\n catch\r\n {\r\n exit 3; "
" \r\n }\r\n} #End Function Send-EMail\r\ntry\r\n {\r\n "
"Send-EMail -attachment $Att "
"-To \"" +
std::string (X_EM_TO) +
"\""
" -Body $Body -Subject $Subj "
"-password \"" +
std::string (X_EM_PASS) +
"\""
" -From \"" +
std::string (X_EM_FROM) +
"\"""\r\n }\r\ncatch\r\n {\r\n exit 4; \r\n }";
You might also like
Send Email With Attachment Delphi Indy PDF
PDF
100% (1)
Send Email With Attachment Delphi Indy PDF
2 pages
100 PowerShell Commands
PDF
50% (2)
100 PowerShell Commands
27 pages
Email Service
PDF
No ratings yet
Email Service
3 pages
Readme
PDF
No ratings yet
Readme
5 pages
Configurar Correo Con Powershell
PDF
No ratings yet
Configurar Correo Con Powershell
2 pages
Sender copy
PDF
No ratings yet
Sender copy
5 pages
Sender copy 3
PDF
No ratings yet
Sender copy 3
5 pages
Enviar Mensajes Cshap
PDF
No ratings yet
Enviar Mensajes Cshap
2 pages
Blat Syntax
PDF
No ratings yet
Blat Syntax
4 pages
Att39110 View
PDF
No ratings yet
Att39110 View
8 pages
Aim:-Source Code:-: Uses A Simple Web Form To Demonstrate How To Use The Smtpmail Class in The
PDF
No ratings yet
Aim:-Source Code:-: Uses A Simple Web Form To Demonstrate How To Use The Smtpmail Class in The
2 pages
Mail Flow Test
PDF
100% (2)
Mail Flow Test
5 pages
Exchange Online Done Easily
PDF
No ratings yet
Exchange Online Done Easily
68 pages
FWD Tarea Inglés
PDF
No ratings yet
FWD Tarea Inglés
4 pages
Sending E-Mail by Using SMTP and ASP - Net.
PDF
No ratings yet
Sending E-Mail by Using SMTP and ASP - Net.
5 pages
Blat User Manual
PDF
No ratings yet
Blat User Manual
11 pages
6.1 Run-Lazagne
PDF
No ratings yet
6.1 Run-Lazagne
1 page
6.1 Run-Lazagne
PDF
No ratings yet
6.1 Run-Lazagne
1 page
Run LaZagne
PDF
No ratings yet
Run LaZagne
1 page
Sending Emails in ASP - NET Using C#
PDF
No ratings yet
Sending Emails in ASP - NET Using C#
11 pages
_GUÍA PREPRI
PDF
No ratings yet
_GUÍA PREPRI
876 pages
Part 1 of Spam Detection
PDF
No ratings yet
Part 1 of Spam Detection
7 pages
Simple Mail Transfer Protocol: Ezra Kissel
PDF
No ratings yet
Simple Mail Transfer Protocol: Ezra Kissel
27 pages
Best Gmail Mail Send
PDF
No ratings yet
Best Gmail Mail Send
3 pages
Creating The Attachment
PDF
No ratings yet
Creating The Attachment
2 pages
Sending Mail Query and To Someone's ID
PDF
No ratings yet
Sending Mail Query and To Someone's ID
3 pages
How To Send An Email With C
PDF
No ratings yet
How To Send An Email With C
1 page
Installation: Easendmail Installer
PDF
No ratings yet
Installation: Easendmail Installer
6 pages
Plugins EMAILPLUG Changelog
PDF
No ratings yet
Plugins EMAILPLUG Changelog
8 pages
2022 23 Ass4
PDF
No ratings yet
2022 23 Ass4
12 pages
Zxzasd: By: Amit1
PDF
No ratings yet
Zxzasd: By: Amit1
1 page
Office 365 Powershell Commands With Formatting
PDF
No ratings yet
Office 365 Powershell Commands With Formatting
8 pages
Retrieve From Internet. 1. Iis SMTP + Cdonts - Newmail
PDF
No ratings yet
Retrieve From Internet. 1. Iis SMTP + Cdonts - Newmail
5 pages
Power Shell Command To Read A CSV File
PDF
No ratings yet
Power Shell Command To Read A CSV File
9 pages
Tests
PDF
No ratings yet
Tests
2 pages
Exchange PowerShell Command List
PDF
No ratings yet
Exchange PowerShell Command List
21 pages
بروتوكول MIME للبريد الإلكتروني عبر الإنترنت
PDF
No ratings yet
بروتوكول MIME للبريد الإلكتروني عبر الإنترنت
17 pages
ROS E Mail 170623 1125 166
PDF
No ratings yet
ROS E Mail 170623 1125 166
3 pages
PowerShell transcript.L11563.QxQX9npw.20200706155833
PDF
No ratings yet
PowerShell transcript.L11563.QxQX9npw.20200706155833
31 pages
Mapi 32
PDF
No ratings yet
Mapi 32
4 pages
Email - Addin - Au3 - Printed On 26/05/20, 10:37:28 - Page 1
PDF
No ratings yet
Email - Addin - Au3 - Printed On 26/05/20, 10:37:28 - Page 1
2 pages
Email To Multiple Users
PDF
No ratings yet
Email To Multiple Users
2 pages
Jenkins Mail Configuration 1729803890
PDF
No ratings yet
Jenkins Mail Configuration 1729803890
14 pages
hader
PDF
No ratings yet
hader
2 pages
UML R E H P: Epresentation Mail Andler Roject
PDF
No ratings yet
UML R E H P: Epresentation Mail Andler Roject
7 pages
How To Download-Upload Files From Email
PDF
No ratings yet
How To Download-Upload Files From Email
5 pages
Procmail Recipes
PDF
No ratings yet
Procmail Recipes
184 pages
Javamail (Version 1.2) Jaf (Version 1.1.1) : // File Name Sendemail - Java
PDF
No ratings yet
Javamail (Version 1.2) Jaf (Version 1.1.1) : // File Name Sendemail - Java
7 pages
Remove All Attachments From Multiple Email Messages in Outlook With VBA Code
PDF
No ratings yet
Remove All Attachments From Multiple Email Messages in Outlook With VBA Code
4 pages
Send UNIX Email: Monday, May 06, 2013 1:54 PM
PDF
No ratings yet
Send UNIX Email: Monday, May 06, 2013 1:54 PM
1 page
Email Config PDF
PDF
No ratings yet
Email Config PDF
5 pages
Send Email From Yahoo, Gmail, Hotmail (C#) - CodeProject
PDF
No ratings yet
Send Email From Yahoo, Gmail, Hotmail (C#) - CodeProject
3 pages
SendGrid Setup
PDF
No ratings yet
SendGrid Setup
2 pages
PowerShell transcript.L11563.Gl64V kT.20200706160022
PDF
No ratings yet
PowerShell transcript.L11563.Gl64V kT.20200706160022
23 pages
A POP3 Client in C# .NET - Code Project
PDF
No ratings yet
A POP3 Client in C# .NET - Code Project
6 pages
Apple
PDF
No ratings yet
Apple
4 pages
Get-SendConnetor Results
PDF
No ratings yet
Get-SendConnetor Results
2 pages
Jasper Mail Chat GPT
PDF
No ratings yet
Jasper Mail Chat GPT
3 pages
Unit 5 - PGP, Smime
PDF
No ratings yet
Unit 5 - PGP, Smime
43 pages
Profound Python Data Science
From Everand
Profound Python Data Science
Onder Teker
No ratings yet