Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for custom headers in email #2

Open
Alecattie opened this issue Jan 9, 2024 · 1 comment
Open

Support for custom headers in email #2

Alecattie opened this issue Jan 9, 2024 · 1 comment

Comments

@Alecattie
Copy link

Hello

I am trying to integrate resend for a django app. The issue is that all my images are being sent as attachments instead of inline images.

for image in images:
file_path = os.path.join(img_dir, image)

        with open(file_path, 'rb') as f:
            img = MIMEImage(f.read())
            img.add_header('Content-ID', '<{name}>'.format(name=image))
            img.add_header('Content-Disposition', 'inline', filename=image)
        msg.attach(img)

    msg.send()

And in my HTML I am referencing as:

<div align="center"> <img src="cid:image_name.png" width="100" height="100" style=""> </div>

I don't know if resend doesn't support adding headers to the email, but they are being sent as attachments

Screenshot 2024-01-08 at 8 30 02 PM

This is a log from one of my emails,

Thanks in advance

@CodingDive
Copy link

Might be related to this issue, resend does not seem to support cid attachments resend/resend-node#319

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants