B
B
bubo2015-11-30 07:52:59
PHP
bubo, 2015-11-30 07:52:59

How to attach a data:image/png;base64 image to a letter and send it to the mail?

Hello.
The site has a constructor that generates svg images. Through js, I took this svg and converted it to base64. Now I need to send this picture to email. At first, I tried to send this picture not as an attachment, but as a link. On thunderbird, the link was displayed normally, but mail.ru cut off this link (completely removed the tag <a>). Sending with an attachment also fails, because for this, as I understand it, you need the path to the picture and the name.
Help, please, to solve this problem. I've been struggling with this issue for several days now.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
OnYourLips, 2015-11-30
@bubo

Libraries should always be used.
In PHP, Swift Mailer is the de facto standard.
Image embedding example
swiftmailer.org/docs/messages.html#embedding-inlin...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question