How do I send inline images from multiple container fields?
When using container fields with the SetInlineImage function, you can only set one container field image at a time. Because of this, you will need to use multiple function calls and use the SMTPit_Append parameter. For example:
SMTPit_SetInlineImage( db::container1) & "ΒΆ" &
SMTPit_SetInlineImage( db::container2 ; "HTML" ; SMTPit_Append)
The first time you call the SMTPit_SetInlineImage function, it sets the image you gave it. If you call the function a second time, it will overwrite the original image, unless you use the SMTPit_Append parameter. Using this parameter will make the function append to the plug-in's internal list of images that you have already set.
Also note, when setting parameters, you cannot skip a parameter, so you must set the 2nd parameter as well, even though you only actually need to use the 3rd parameter which is the SMTPit_Append. For the second parameter, there is currently only one type, which is "HTML", so make sure to include it as shown above.
When referencing the images in your HTML code, you must use the HTML <img> tag like this:
<img src="CID:partX">
The X is the number that is associated with each image. The image number is determined by the order you set the image with the SMTPit_SetInlineImage function. In the original example above, the "db::container1" image was set in the first function call, so it would be part1, and the "db::container2" image was set in the second function call, so it would be part2.
Also note, instead of the CID:partX, you can use the image filename if you know it and want to. So while you can use this:
<img src="CID:part1">
you can also do this and it would be exactly the same:
<img src="flower.jpg">
This is assuming the "db::container1" field contained an image with the filename of "flower.jpg."