New-Object : Exception calling ".ctor" with "0" argument(s): "The type initializer for 'MimeKit.ParserOptions' threw an exception." At C:\Users\rangel\OneDrive - Radiance Technologies, Inc-\Documents\Scripts\TestEmail.ps1:38 char:17 + $Message = New-Object MimeKit.MimeMessage + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvocationException + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand Exception calling ".ctor" with "1" argument(s): "The type initializer for 'MimeKit.ParserOptions' threw an exception." At C:\Users\rangel\OneDrive - Radiance Technologies, Inc-\Documents\Scripts\TestEmail.ps1:43 char:7 + $TextPart = [MimeKit.TextPart]::new("plain") + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : TypeInitializationException The property 'Text' cannot be found on this object. Verify that the property exists and can be set. At C:\Users\rangel\OneDrive - Radiance Technologies, Inc-\Documents\Scripts\TestEmail.ps1:46 char:5 + $TextPart.Text = $Body + ~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : PropertyNotFound You cannot call a method on a null-valued expression. At C:\Users\rangel\OneDrive - Radiance Technologies, Inc-\Documents\Scripts\TestEmail.ps1:48 char:5 + $Message.From.Add($From) + ~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\Users\rangel\OneDrive - Radiance Technologies, Inc-\Documents\Scripts\TestEmail.ps1:49 char:5 + $Message.To.Add($To) + ~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull The property 'Subject' cannot be found on this object. Verify that the property exists and can be set. At C:\Users\rangel\OneDrive - Radiance Technologies, Inc-\Documents\Scripts\TestEmail.ps1:59 char:5 + $Message.Subject = $Subject + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : PropertyNotFound The property 'Body' cannot be found on this object. Verify that the property exists and can be set. At C:\Users\rangel\OneDrive - Radiance Technologies, Inc-\Documents\Scripts\TestEmail.ps1:60 char:5 + $Message.Body = $TextPart + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : PropertyNotFound Exception calling "Send" with "1" argument(s): "Value cannot be null. Parameter name: message" At C:\Users\rangel\OneDrive - Radiance Technologies, Inc-\Documents\Scripts\TestEmail.ps1:69 char:7 + $SMTP.Send($Message) + ~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : ArgumentNullException