我正在尝试通过powershell脚本在outlook邮件正文中插入桌面上的.images,邮件正在发送,但邮件正文中没有图像

我正在尝试通过powershell脚本在outlook邮件正文中插入桌面上的.images,邮件正在发送,但邮件正文中没有图像,powershell,powershell-2.0,powershell-3.0,powershell-4.0,Powershell,Powershell 2.0,Powershell 3.0,Powershell 4.0,我正在尝试通过将桌面上的图像插入outlook邮件正文 powershell脚本,邮件将与下面的脚本一起发送,但图像不会传入 邮件正文。请检查并告诉我哪里做错了。请注意我没有 希望作为附件,我希望它在邮件正文。请帮助它将真的非常 可观的 下面是powershell脚本 $file1 = "C:\Users\rony\Desktop\screenshot.png" sleep 02 $Outlook = New-Object -ComObject Outlook.Ap

我正在尝试通过将桌面上的图像插入outlook邮件正文 powershell脚本,邮件将与下面的脚本一起发送,但图像不会传入 邮件正文。请检查并告诉我哪里做错了。请注意我没有 希望作为附件,我希望它在邮件正文。请帮助它将真的非常 可观的

下面是powershell脚本

     $file1 = "C:\Users\rony\Desktop\screenshot.png"
     sleep 02
     $Outlook = New-Object -ComObject Outlook.Application
     $Mail = $Outlook.CreateItem(0)
     $Mail.To = "rony7@gmail.com"
     $Mail.Subject = "screenshot status"
     $Mail.HTMLBody =  @"
     <html>
     <body>
     Hi ,
        <p>Please find the below screenshots of status.
         <p>
         <img src="cid:image1.png">

         <p>Thank you!

         </body>
         </html>
          "@
       $attachment = New-Object System.Net.Mail.Attachment($file1)
       $attachment.ContentDisposition.Inline = $True
       $attachment.ContentDisposition.DispositionType = "Inline"
       $attachment.ContentType.MediaType = "image/png"
       $attachment.ContentId = 'image1.png'
       $Mail.Attachments.Add($attachment)
       sleep 05
       $Mail.Send()
$file1=“C:\Users\rony\Desktop\screenshot.png”
睡眠02
$Outlook=新对象-ComObject Outlook.Application
$Mail=$Outlook.CreateItem(0)
$Mail.To=”rony7@gmail.com"
$Mail.Subject=“屏幕截图状态”
$Mail.HTMLBody=@”
你好
请查看以下状态截图。

谢谢大家!!
"@
$attachment=新对象System.Net.Mail.attachment($file1)
$attachment.ContentDisposition.Inline=$True
$attachment.ContentDisposition.DispositionType=“Inline”
$attachment.ContentType.MediaType=“image/png”
$attachment.ContentId='image1.png'
$Mail.Attachments.Add($attachment)
睡眠05
$Mail.Send()

…它不适合我。请回答这个问题,并详细阐述这个略显含糊的说法。请按和。请再次检查。。上面是为发送邮件而创建的脚本,它还将从outlook邮件正文中的桌面位置插入图像。但问题是邮件正在发送,但邮件正文上没有显示图像。包含一些可能有用的C#代码。关于这个问题的其他答案值得一读。有人能帮我吗。。。如何在outlook邮件正文中插入图像?