Can anyone provide the additional code required to embed the JPG picture in the body of the email using Net::SMTPS? Thanks in advance for your help.
# Email body.
$smtp->datasend("--$boundary\n");
$smtp->datasend("Content-type: text/plain\n");
You have a conflict between your code and your problem description. Your problem description says that you want to embed an image, but your code shows that you are using plaintext. You cannot "embed an image" in plaintext. When Outlook sends an email with embedded images, it is either in rich text format, or in HTML. (I can see this when I compose a message in my Office 2016 Outlook client: the "Format Text" menu will show either HTML Text, Plain Text, or Rich Text. If you have an embedded image and select Plain Text, the embedded image goes away, because images are not plain text.)
So instead of doing a Content-type: text/plain, use the right header for rich text or html, and format the data in that section of the email as either rich text or html. And sorry, I don't know how to set an HTML img src to point to an attachment in your email: if you send yourself a rich text email and an HTML text email, both with embedded images, from Outlook to someplace that can read the actual source of the email, then you can see how exactly the rich text or HTML are structured to link to the image.