I have made a few improvements. This will now take an array of image paths and generate an email with all the images in-line.
You can wrap this in a function or paste straight into a .PS1 file and it will take the parameters listed at the top.