Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/84.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ssis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/41.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法在ssis中的脚本任务中使用html电子邮件发送图像_Html_Ssis_Script Task - Fatal编程技术网

无法在ssis中的脚本任务中使用html电子邮件发送图像

无法在ssis中的脚本任务中使用html电子邮件发送图像,html,ssis,script-task,Html,Ssis,Script Task,我有一个包,我发送电子邮件与图片内联。我在包中的脚本任务中使用html格式 问题是,当我把我的别名作为收件人时,我收到了预期的电子邮件。具有图像和字体。但当我把我同事的别名作为收件人时,他只得到了html页面,里面没有图片 如果图像在我的本地机器上,他不应该在我从我的终端运行包并且图像在我的机器上可用时也获取图像吗 ****it is not a good approach its better you put image on some server and upload it and fr

我有一个包,我发送电子邮件与图片内联。我在包中的脚本任务中使用html格式

问题是,当我把我的别名作为收件人时,我收到了预期的电子邮件。具有图像和字体。但当我把我同事的别名作为收件人时,他只得到了html页面,里面没有图片

如果图像在我的本地机器上,他不应该在我从我的终端运行包并且图像在我的机器上可用时也获取图像吗

****it is not a good approach its better you put image on  some server and upload it and from there via  <img src""> embed into you email body.
This way it will resolve the issue and a standardized way .****

Other wise call the image through config file  and pass that value as a [parameter :

<Configuration ConfiguredType="Property" Path="\Package.Variables     [User::EmbedImagePath].Properties[Value]" ValueType="String">
    <ConfiguredValue>**Path of the file** </ConfiguredValue>
  </Configuration>

than in the script call this :
lnkRes = New LinkedResource(Dts.Variables("EmbedImagePath").Value.ToString, System.Net.Mime.MediaTypeNames.Image.Jpeg)
            lnkRes.ContentId = "**Imagename**"

            altView = AlternateView.CreateAlternateViewFromString(varMailBody, Nothing, System.Net.Mime.MediaTypeNames.Text.Html)
            altView.LinkedResources.Add(lnkRes)