Sendgrid-php: base64 inline image in email

Created on 7 Nov 2017  路  2Comments  路  Source: sendgrid/sendgrid-php

Issue Summary

Generating html content based on user inputs, where images are converted to base 64 string. and embedded in email. But when sending email through sendgrid, the images are not shown in email.

Steps to Reproduce

{"personalizations": [{"to": [{"email": "sandeep.[email protected]"}]}],"from": {"email": "sandeep.[email protected]","name": "Emaar Properties"},"subject": "Document Description as Subject","content": [{"type": "text/html", "value":"

Table goes here
\r\n

\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
11111
11111


"}]}

Technical details:

  • sendgrid-php Version: master (latest commit: [commit number])
  • PHP Version: 5.x
help wanted question

Most helpful comment

Is this a quoting issue / misformed JSON? "value":"<img src="data:image

All 2 comments

Hi @sandeep528,

Do you mind sharing the code that generates that payload?

With Best Regards,

Elmer

Is this a quoting issue / misformed JSON? "value":"<img src="data:image

Was this page helpful?
0 / 5 - 0 ratings

Related issues

izhukovich picture izhukovich  路  4Comments

KayakinKoder picture KayakinKoder  路  5Comments

iamanupammaity picture iamanupammaity  路  4Comments

bjornmann picture bjornmann  路  3Comments

atsareva picture atsareva  路  4Comments