Send inline image in email

前端 未结 12 2151
夕颜
夕颜 2020-11-22 11:09

Having an issue sending an image via email as an embedded image in the body. The image file shows as an attachment which is ok but the inline image portion just shows as a r

12条回答
  •  时光取名叫无心
    2020-11-22 11:44

    You need to add the LinkedResource into an AlternateView

    AlternateView alternateView = AlternateView.CreateAlternateViewFromString("

    Client: " + data.client_id + " Has Sent You A Screenshot

    " + @"", null, "text/html"); alternateView.LinkedResources.Add(inline); mail.AlternateViews.Add(alternateView);

提交回复
热议问题