build.ps1
Set-Location -Path "C:\Users\peter\OneDrive\Documents\dev\powershell\SGMailer" New-ModuleManifest -Path "SGMailer.psd1" ` -Author "Peter Ruzicska" ` -ModuleVersion "1.0.0.11" ` -Description "SendGrid v3 REST API PowerShell module for sending automated emails via SendGrid." ` -PowerShellVersion "5.1" ` -RootModule "SGMailer.psm1" ` -ProjectUri "https://github.com/peterruzicska/SGMailer" ` -LicenseUri "https://github.com/peterruzicska/SGMailer/blob/main/LICENSE" ` -HelpInfoUri "https://github.com/peterruzicska/SGMailer/blob/main/README.md" ` -Tags "SendGrid","SendMail","EmailAutomation","mail","email" ` -FunctionsToExport "Send-SGMail","Install-SGToken","New-SGToken","ConvertTo-SGEncryptedToken","ConvertFrom-SGEncryptedToken" $prerequisites = "- SendGrid basic tier environment at least. - SendGrid API key with at least these scopes: - api\_keys.create - api\_keys.delete - api\_keys.read - api\_keys.update - mail.send" $howto = "Install-Module SGMailer \<\<API key with API key creation privilege\>\> | New-SGToken | Install-SGToken Send-SGMail -From john.doe@example.com -To jane.doe@example.com -Subject \`"Confession\`" -Body \`"\<p\>\<b\>LOVE\</b\> \<i\>you!\</i\>\</p\>\`"" #Copy-Item ".\SGMailer.*" -Destination "C:\Users\peter\OneDrive\Documents\dev\powershell\SGMailer" -Force #Copy-Item ".\SGMailer.*" -Destination "C:\Users\peter\OneDrive\Documents\dev\powershell\SGMailer" -Force #Remove-Module SGMailer -ErrorAction SilentlyContinue #Import-Module SGMailer Publish-Module -Path . -NuGetApiKey "oy2lvypijy4dqgu2gfyar2uodmqcgylergf6ammp62zk2m" |