Swift-SMTP
Swift-SMTP copied to clipboard
HTML related attachment image not work on gmail mail
Hello I have a face issue when i add html content with related attachment and send it to mail send function Using below CONTENT-ID that work only in iphone mail not in gmail mail. In gmail mail it take as a attachment instead of html src.
// Create a file `Attachment`
let fileAttachment = Attachment(
filePath: "~/img.png",
// "CONTENT-ID" lets you reference this in another attachment
additionalHeaders: ["CONTENT-ID": "img001"]
)
// Create an HTML `Attachment`
let htmlAttachment = Attachment(
htmlContent: "<html>Here's an image: <img src=\"cid:img001\"/></html>",
// To reference `fileAttachment`
related: [fileAttachment]
)
Thank you Ruchi