Forum Discussion
DabearMDF58
Apr 03, 2024Copper Contributor
Trying to Send IRM Encrypted Email But Body Of Email Is Blank
0 I am writing a script that will open an encrypted Outlook Template File to send and encrypted email. However, the body of the email is not popluating. Code below. Any help would be appreciat...
LainRobertson
Apr 03, 2024Silver Contributor
Hi, Matthew.
I can't see enough of your screenshot to confirm which message composition mode is your default, however, if it happens to be HTML (it will display at the end of the window title as shown in the example below) then you need to populate the HTMLBody property, not the Body property - per your current example.
Cheers,
Lain
- DabearMDF58Apr 03, 2024Copper ContributorHey Lain,
I have tried both properties and then both come up blank.- LainRobertsonApr 04, 2024Silver Contributor
Did you assign HTML content to that attribute?
$Mail.HTMLBody = "<html><body>Please Double Check The Vendors Email Address And Then Enter It Again</body></html>";
Cheers,
Lain
- DabearMDF58Apr 04, 2024Copper Contributor
Yeah I tried that. I even used ConvertTo-Html and set that as the Body and piped it to a variable and then added the variable to the htmlbody property.