Attaching images to Emails with SMTP

Continuing the discussion from Insert a picture to email body:

Hi all, I’ve gone through the above advice, and have got the emailing sending, however, the image appears as such:

Has anyone got any ideas why, is this a UiPath code issue, or an email issue?

Email body is strBody which is:


The image is saved in the same folder as the Main.xaml file.


1 Like


Wat you can do is encode your image as a 64bit encoding string:

Here is a post how to add this once you’ve created the string:

Thanks, this is still blocked though, the campaign monitor website even notes that it would be :frowning:

Tried it again, this time the email doesn’t even send :stuck_out_tongue:

Has anyone successfully used SMTP to send images?


Try this solution:

@Alex_Cross What is the location of the image?

Hi guys, this is now about 8 months old and something I was doing on the side to show someone how it could work, so I appreciate the enthusiasm :stuck_out_tongue:

The image was stored on my local machine, but ultimately it was one I’d saved from google images, or could have uploaded somewhere, so location could really have been anywhere.