I am trying to send an email from an iOS device (Using Xamarin) in an HTML format with images embedded in the body of the email.
Some solutions that I found online suggest to use an approach similar to the one shown here:
NSData ImgData = UIImage.FromFile(FileName).AsJPEG();
string img64baseStr = ImgData.GetBase64EncodedString(NSDataBase64EncodingOptions.None);
string srcStr = string.Format("data:image/jpg;base64,{0}", img64baseStr);
Using the code above I can see the pictures properly in the iOS Email client. However, when the email is sent I can't see the images on the receiving side. There are other setbacks to this approach, but I can avoid getting into those in more details at this point.
I have also tried using the images as resources in the project. However, when I reference the pictures directly in the HTML in this form:
<img src="Pic1.png" width="700" height="500" alt=""/>
the linkage is broken and the email is missing the images.
How can I properly reference resource images in an HTML email?