powershell email with html picture showing red x

前端 未结 2 1369
囚心锁ツ
囚心锁ツ 2020-12-20 05:37

I have a powershell script that sends out an email with an picture in the HTML but the picture is showing up as a blank square with a red X on it. I can\'t seem to figure ou

2条回答
  •  無奈伤痛
    2020-12-20 06:02

    What I see that you can try is change the following. I had the same issue.

    I copied from your code above:

    $att.ContentId = “pic” to $att.ContentId = “pic.png”
    

    and in the image tag change:

    src=’cid:pic’  
    

    to

    src=’pic.png’ 
    

提交回复
热议问题