Enough-Software / enough_mail

IMAP, POP3 and SMTP clients for Dart developers. Contains both low level as well as a high level API.
Mozilla Public License 2.0
104 stars 56 forks source link

add Content-ID on attachments with low level smtp api #201

Closed Tzanou123 closed 2 years ago

Tzanou123 commented 2 years ago

Hello,

Is there any way to add and customize a Content-ID on attachments with low level smtp api ?

I need it to make a reference on an tag in my html

i actually use await builder.addFile(file, MediaSubtype.imageJpeg.mediaType);

Thanks

robert-virkus commented 2 years ago

I believe you can achieve your goal using this code:

final partBuilder = await builder.addFile(file, MediaSubtype.imageJpeg.mediaType);
partBuilder.addHeader('Content-Id', 'yourUniqueIdHere');
Tzanou123 commented 2 years ago

Thanks dude !