GithubHelp home page GithubHelp logo

Comments (6)

robneu avatar robneu commented on July 20, 2024

Definitely seems to be an issue with the headers, setting the $message_args['headers']['Content-Type'] default to apply_filters( 'wp_mail_content_type', 'text/html' ) fixes the issue.

I'm sure it probably breaks other things though. I'm not sure why that filter isn't being set correctly by gforms.

from aws-ses-wp-mail.

rmccue avatar rmccue commented on July 20, 2024

My guess would be differing defaults. Can you trace down the wp_mail call and find what's passed into it?

from aws-ses-wp-mail.

robneu avatar robneu commented on July 20, 2024

Looks like it's a case sensitivity thing. It passes in Content-type rather than Content-Type in the headers.

from aws-ses-wp-mail.

rmccue avatar rmccue commented on July 20, 2024

That was my second guess :) Headers are case-insensitive, so we should take this into account when we're merging this. Potentially, we can use Requests_Utility_CaseInsensitiveDictionary which is designed for exactly this purpose, but likely overkill here.

from aws-ses-wp-mail.

robneu avatar robneu commented on July 20, 2024

After a bit more digging, it looks like the real issue is that in this case the headers are being unset here.

You end up with an empty array before the camel case conversion runs and the defaults are merged.

I'm having a little trouble wrapping my head around exactly why all the values are being unset though...

from aws-ses-wp-mail.

rmccue avatar rmccue commented on July 20, 2024

Aha, discovered what's happening here.

Gravity Forms sets $headers['Content-type'] = "Content-type: text/html ...", which is redundant. The unset is there so that the old header is deleted when we convert, but that breaks this use case.

Easy enough to fix.

from aws-ses-wp-mail.

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.