I would like to ask how CID images are handled by the email client provided by Microsoft, especially in the case of GraphMailer.
To my knowledge, it should work like this:
A unique CID (Content-ID) represents a specific image. When I upload an image into attachments, it should be stored somewhere in the storage of GraphMailer.
So, when I want to add an inline image into the email body, I first need to upload it somewhere, which I assume would be in the Microsoft GraphMailer’s attachments folder. After uploading, I am unsure if I need to generate a unique CID number or if it will be generated by GraphMailer upon upload to attachments.
I need to somehow obtain the CID of inline images so I can include it in the email body correctly.
Additionally, I need to know where attachments are stored, how to obtain a CID, and how to represent it correctly in the email body so that other email clients, such as Gmail, will understand and decode it properly.
Can anyone provide a simple and basic code sample along with information on how to handle such a case?
Thank you!
- Decoded and transformed base64 image string into image file and stored it within server.(huge strings asre not handled correctly by g-mail, so image wasn’t shown yet base64 string was included)
- Generated unique cid
- Uploaded image to attachments
- Deleted image from server folder, due to it’s presence within e-mail attachments.
- Imported and sended it within e-mail body
- Checked it within recieved g-mail(not succesfully shown as in-lined image)
I need to use php/js only due to project requirements.