This PowerShell module provides a simple interface for sending emails and text messages using the SMTP2GO service. It includes functions to set credentials, send emails, and send text messages via email-to-SMS gateways.
- Set SMTP2GO credentials once for the session.
- Send emails with customizable to, from, subject, and body parameters.
- Send text messages via supported email-to-SMS gateways for various carriers.
- PowerShell 5.1 or later.
- An active SMTP2GO account with API credentials.
-
Clone this repository or download the ZIP file.
-
Extract the files to a directory of your choice.
-
Import the module into your PowerShell session:
Import-Module /path/to/SMTP2GOModule/SMTP2GOModule.psm1
-
Set your SMTP2GO credentials and, optionally, your phone number and carrier for text messaging:
Set-SMTP2GOCredentials -Username "your_username" -Password "your_password" -PhoneNumber "your_phone_number" -Carrier "your_carrier"
Supported carriers include "ATT", "Verizon", "TMobile", and "Sprint". You can add more carriers to the
$CarrierEmailMappings
hashtable in the module. -
Send an email:
Send-SMTP2GOEmail -To "[email protected]" -From "[email protected]" -Subject "Test Email" -Body "This is a test email."
-
Send a text message:
Send-SMTP2GOTextMessage -Message "This is a test text message."
Contributions are welcome! Feel free to open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.