Login  
Search All Forums
Dart Home | PowerTCP Mail for .NET | Custom Development Reply | PowerTCP Mail for .NET Topics | Forums   
AuthorForum: PowerTCP Mail for .NET
Topic: Error creating HTML email using embedded images
Intelly

From: Netherlands
Posts: 3
Member Since: 01/08/16
posted March 29, 2018 4:42 AM

Hi,

When creating a html image using emebedded resources (like ... <img alt="cid:image001.png@01D362E5.1EEFC820" height="79" src="data:image/png;base64,iVBORw0KGgoA ...)
using the follwing constructor: Using dartMail As New Dart.Mail.MailMessage(bodyText, bodyTextHtml, (New List(Of System.IO.FileInfo)).ToArray)
I get the following error: "MultipartRelated() htmlResources parameter missing reference to HTML linked resource: data:image/png;base64,iVBORw0KGgoA ..."


How do I create an email from HTML with embedded image(s) without getting errors?

Kind regards.
Jamie Powell (Admin)

From: Rome, NY USA
Posts: 448
Member Since: 03/13/07

Extra Support Options
Custom Application Development

posted April 6, 2018 5:30 PM

Thank you for your post.

Are you populating the third constructor argument with values (it appears that you aren't)? It must contain FileInfo objects representing the file referenced in the HTML. The snippet here ought to get you started:
http://www.dart.com/help/ptmlnet/webframe.html#Dart.Mail~Dart.Mail.MailMessage~_ctor(String,String,FileInfo[]).html

Purchase of a support and maintenance Subscription is required if additional technical assistance is needed. Please contact sales@dart.com or call 315-790-5456 for more information.
Intelly

From: Netherlands
Posts: 3
Member Since: 01/08/16
posted April 7, 2018 2:37 AM

Hi,

I don't populate the third parameter.
The image is embedded in the html (as a base 64 string). I don't want to parse the html and/or replace the embedded image with a link.

I was hoping dart could do this automatically (the .net mail function can do this without problem, but has other limitations (this is why I use dart)).

Is this feature (embedded images as base 64 in html - without a need to parse this manually) supported?

Jamie Powell (Admin)

From: Rome, NY USA
Posts: 448
Member Since: 03/13/07

Extra Support Options
Custom Application Development

posted April 13, 2018 4:46 PM

Thank you for your reply.

That constructor is for generating an email from HTML with external files. Set MailMessage.Html to your HTML in order to resolve your issue.

------
-Non-current subscribers must contact sales@dart.com to update subscription and receive continued support as needed.
------

Reply | PowerTCP Mail for .NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX