- docs: fix permissions typo in README by @PrzemyslawKlys in #66
- fix: correct verbose message for Get-IMAPFolder by @PrzemyslawKlys in #67
- Update POP message retrieval by @PrzemyslawKlys in #69
- test: define sample body content for Send-EmailMessage by @PrzemyslawKlys in #68
- docs: fix spelling mistakes by @PrzemyslawKlys in #72
- Add tests for ConvertFromGraphCredential by @PrzemyslawKlys in #71
- Add GetEmailAddress unit tests by @PrzemyslawKlys in #70
- Futher improvements by @PrzemyslawKlys in #73
- Fix SMTP auth optional by @PrzemyslawKlys in #76
- feat: add
RetryCountparameter toSend-EmailMessageallowing optional retries - feat: support configurable delay and exponential backoff via
RetryDelayMillisecondsandRetryDelayBackoff
Full Changelog: https://github.com/EvotecIT/Mailozaurr/compare/v2.0.0-Preview5...v2.0.0-Preview6
- Removed
Resolve-DnsQuery=> moved to DnsClientX, which uses it's own library - Removed
Resolve-DnsRequestRest=> moved to DnsClientX, which uses it's own library - Removed all functions related to DNS (will be moved to DomainDetective module)
Find-MXRecordFind-SPFRecordFind-DKIMRecordFind-DMARCRecordFind-DNSBLFind-DNSSECRecordFind-CAARecordFind-BIMIRecordFind-MTASTSRecordFind-O365OpenIDRecordFind-SecurityTxtRecordFind-TLSRPTRecordFind-IPGeolocationFind-DANERecordFind-CAARecordFind-DNSSECRecord
- Replaced
Test-EmailAddressfunction withTest-EmailAddressbinary cmdlet - Improvements to
Send-EmailMessage- Removed
Email/EmailParametersparameters as they are not needed, and legacy - Added
DeliveryNotificationOptionas an enum instead of strings - Internal improvements
- Dispose() of SmtpClient in the end
- Replaced PowerShell classes with C# version
- Moved some PowerShell code to C# for better performance and simpler logic
- Removed
- Update to DLLs to latest versions
- Removes some unnecessary DLLs
- Different way to build module and load dependencies
- Removal of DLLs from source codes
- Small updates to DLLs
- Add new DLLs
- Added
ConvertFrom-EmlToMsgto convert EML files to MSG files - Added
Import-MailFileto import MSG/EML files to PowerShell Object - Added
Get-MailMessage - Added
Get-MailMessageAttachment - Added
Find-BIMIRecord - Added
Find-CAARecord - Added
Find-DANERecord - Added
Find-MTASTSRecord - Added
Find-O365OpenIDRecord - Added
Find-SecurityTxtRecord - Added
Find-TLSRPTRecord - Added
Find-DNSSECRecord - Improve
Find-DMARCRecordto return more data - Added
Get-DMARCDatato read DMARC data from XML files - Added
Find-IPGeolocationto get IP Geolocation data - Small improvements to error handling
- Rename
SkipCertificateValidatationtoSkipCertificateValidationinSend-EmailMessage(typo fix) - Added
SkipCertificateValidationtoConnect-IMAP - Added
SkipCertificateValidationtoConnect-POP3 - Added
SkipCertificateRevocationtoConnect-IMAP - Added
SkipCertificateRevocationtoConnect-POP3 - Use simpler certificate validation callback by @jborean93 in #42
- Updated
Microsoft.Identity.Client.dllto 4.44 to matchExchangeOnlineManagementmodule
- Add support for sending emails with graph using Delegated permissions. It uses Microsoft.Graph.Authentication module and
MgGraphRequestswitch onSend-EmailMessage.
Import-Module Mailozaurr
Import-Module Microsoft.Graph.Authentication -Force
# this shows how to send email using combination of Mailozaurr and Microsoft.Graph to use Connect-MgGraph to authorize
$Body = EmailBody {
New-HTMLText -Text "This is test of Connect-MGGraph functionality"
}
# authorize via Connect-MgGraph with delegated rights or any other supported method
Connect-MgGraph -Scopes Mail.Send
# sending email
$sendEmailMessageSplat = @{
From = 'przemyslaw.klys@test.pl'
To = 'przemyslaw.klys@test.pl'
HTML = $Body
Subject = 'This tests email as delegated'
MgGraphRequest = $true
Verbose = $true
}
Send-EmailMessage @sendEmailMessageSplat- Fix
Suppressfor sending emails via SendGrid - Fix
Suppressfor sending emails via Microsoft Graph - Add support to
Send-EmailMessagefor attachments 4MB to 150MB in size for Microsoft Graph. Before it would only send attachments up to 4MB in size. Detects size automatically and uses the appropriate API endpoint. - Add
RequestReadReceiptsupport toSend-EmailMessagefor Microsoft Graph to request a read receipt from the recipient. - Add
RequestDeliveryReceiptswitch toSend-EmailMessagefor Microsoft Graph to request a delivery receipt. SMTP usesDeliveryNotificationOptionandDeliveryStatusNotificationType. - Require
Send-EmailMessageto have From field #33 - Warn if attachment in
Send-EmailMessagedoesn't exists, no error is thrown #34 - Fixes special chars issue in file names #26
- Updated
MailKit - Updated
MimeKit - Added missing libraries so that the project can work on more systems without installing higher version of .NET Framework
- Added tests for SMTP with Auth and Graph API
- Improved logging logic for
Send-EmailMessage
- Added option to
Send-EmailMessageto specify theLocalDomainto be able to troubleshoot issue #1314 - Added option to
Send-EmailMessage-LogConsoleandLogObjectwhich joinsLogPathin saving whole conversation to console, or to final object as Message property
- Upgraded
MailKit\MimeKitto 3.1.0 - Added support to save MimeMessage in
Send-EmailMessageusingMimeMessagePath - Fixed
Cloudflare DNS callsforFind-DMARCRecord,Find-DKIMRecord,Find-MXRecord,Find-SPFRecord,Find-DNSBNL - Updated docs
- More output fields on
Send-EmailMessage
- Added support for logging in the
Send-EmailMessagefor SMTP to allow for debugging.- By adding
LogPath $PSScriptRoot\Output\Log1.txtlog file will be created with full information - Parameters such as
LogSecrets,LogTimeStamps,LogTimeStampsFormatandLogClientPrefix,LogServerPrefixare available
- By adding
- Added support for using
Get-MsalTokeninstead of built-in token creation for GraphApi
# creating body for HTML using PSWriteHTML
$Body = EmailBody {
New-HTMLText -Text "this is my test"
New-HTMLText -Text "Łączy nas piłka"
}
# Generating token using Get-MsalToken
$getMsalTokenSplat = @{
ClientId = '0fb383f1'
ClientSecret = 'VKDM_' | ConvertTo-SecureString -AsPlainText
Authority = 'https://login.microsoftonline.com/ceb371f6'
}
$MsalToken = Get-MsalToken @getMsalTokenSplat
# Converting it to Credentials object (so that Send-EmailMessage can use it)
$Credential = ConvertTo-GraphCredential -MsalToken $MsalToken.AccessToken
# sending email
Send-EmailMessage -From 'przemyslaw.klys@something.pl' -To 'przemyslaw.klys@something.else' -Credential $Credential -HTML $Body -Subject 'This is another test email 2' -Graph -Verbose -Priority Low -DoNotSaveToSentItems- Fixes encoding for Send-EmailMessage wen using GraphApi (forces UTF8)
- Improved error handling of
Send-EmailMessagewhen sending with GraphApi
- Upgraded
MailKit/Mimekit2.15.0 - Upgraded
DNSClientto1.5.0 - Fixes
oAuth2#17 - Removed wrong parameterset from
Send-EmailMessage - Improved
ConvertTo-GraphCredentialto support encrypted graph client secret.
- Moved Class.MySmtpClient to be loaded from separate file via dot sourcing - hopefully fixes #16
- Moved Class.MySmtpClient to be loaded as last in PSM1. This should make it load when loaded by other modules - hopefully!
- Added missing library
System.Buffers
- Added
SkipCertificateValidatationtoSend-EmailMessage - Downgraded
MailKit/MimeKit 2.12.0
- Added
AsSecureStringtoSend-EmailMessagewhich allows to provide-AsSecureString -Username 'przemyslaw.klys@domain.pl' -Password $secStringPassword
- Added
SkipCertificateRevocationtoSend-EmailMessage#13 - 🐛 Fixed PTR records in
Find-MXRecordwhen using HTTPS - Small improvement to
Send-EmailMessagereturning object when usingWhatIf
Send-EmailMessage- fix for Graph where attachments where not attached and nobody reportedSend-EmailMessage- updated error messages with tips what could be wrongSend-EmailMessage- updated ErrorAction Stop in few places for those that prefer errorsSend-EmailMessage- added basic support for SendGrid with parameter-SendGridFind-MXRecord- updated withDNSProvider(Cloudflare/Google) for calls over HTTPSFind-SPFRecord- updated withDNSProvider(Cloudflare/Google) for calls over HTTPSFind-DKIMRecord- updated withDNSProvider(Cloudflare/Google) for calls over HTTPSFind-DMARCRecord- updated withDNSProvider(Cloudflare/Google) for calls over HTTPSFind-DNSBL- added, same options as aboveResolve-DNSRequestRest- Added just in case
- DNS Records
- Fixed
DNSServerparameter usage #5
- Fixed
- MS Graph API
- Added
Get-MailFolder- work in progress - Added
Get-MailMessage- work in progress - Added
Save-MailMessage- work in progress - Added check for attachments/message body less than 10 characters. - by andrew0wells #3
- Added
- SMTP
- Updated
Send-EmailMessageerror handling
- Updated
- More updates making it better toolkit
- Public release
- Added GraphAPI support for Send-EmailMessage
- Added oAuth2 support for Send-EmailMessage
- Added oAuth2 support for POP3
- Added oAuth2 support for IMAP4
- Fixed lots of stuff
- Added
Test-EmailAddress - Added
Connect-OAuthGoogle - Added
Connect-OAuthO365 - Added
Resolve-DNSQuery
- Added
Find-MXRecord - Added
Find-DMARCRecord - Added
Find-DKIMRecord - Added
Find-SPFRecord
- Initial release