Code Monkey home page Code Monkey logo

Comments (5)

alysson-azevedo avatar alysson-azevedo commented on August 21, 2024

Hi. I edited the MailgunTransport class and figured that if you add the line

$this->_attachments['inline'] = $attachments;

after this line, it works.

The problem is that the attachment will be send twice, so it's not a good solution

from cakephp-mailgun.

narendravaghela avatar narendravaghela commented on August 21, 2024

Sending them twice is not a good idea. I will check what can be done for this.

from cakephp-mailgun.

alysson-azevedo avatar alysson-azevedo commented on August 21, 2024

Hey, @narendravaghela did you check this issue?

Soon i'll need to send inline attachments, so i'll try to fix this issue somehow.
The way i'm thinking to handle this is on:

    if (!empty($attachments)) {
        $this->_attachments['attachment'] = $attachments;
    }

If $attachments' itens have the contentId property, i can shift them from the $attachments into a new variable and then $this->_attachments['inline'] = $inlineAttachments; or something like that.

What do you think?

from cakephp-mailgun.

narendravaghela avatar narendravaghela commented on August 21, 2024

Hi @alysson-azevedo
Didn't get time to check this plugin, sorry about that :)
I think the plugin needs to be updated in many ways as there is Cake 3.6 out now. I haven't used this plugin for a long time, so need to check for inline attachments. But the proposed solution looks good to me for now.
Also, please generate PRs for the fixes that you have made in this plugin, so others can take benefits.

from cakephp-mailgun.

alysson-azevedo avatar alysson-azevedo commented on August 21, 2024

Ok, i'll look into that.

from cakephp-mailgun.

Related Issues (19)

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.