Giter VIP home page Giter VIP logo

Comments (3)

kevin-brown avatar kevin-brown commented on August 26, 2024

This looks like it's probably the same bug as #34.

from sendgrid-django.

gomezjdaniel avatar gomezjdaniel commented on August 26, 2024

It is. I already made a workaround fix -which miss the possibility that reply-to email includes a name- in a forked repository of this one that includes inside _build_sg_mail

        if email.reply_to:
            if isinstance(email.reply_to, str):
                mail.set_reply_to(Email(email.reply_to))
            else:
                mail.set_reply_to(Email(email.reply_to[0]))

Thing is Django asks as reply_to for a tuple/list while sendgrid only accepts one email as reply_to. Do you know if the email specification allows multiple emails in Reply-to header?

from sendgrid-django.

abendig avatar abendig commented on August 26, 2024

Our fix currently looks like this:

        for k, v in email.extra_headers.items():
            if k.lower() == "reply-to":
                mail.set_reply_to(Email(v))
            else:
                mail.add_header({k: v})
        if not mail.reply_to and hasattr(email, 'reply_to') and email.reply_to:
            mail.set_reply_to(Email(email.reply_to[0]))

Based on the discussion in #34 I can't tell how close an actual fix here is. Happy to help/contribute a PR for this though.

from sendgrid-django.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.