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

[5.2] Fix SparkPost doesn't send attachments #13577

Merged
merged 2 commits into from
May 17, 2016
Merged

[5.2] Fix SparkPost doesn't send attachments #13577

merged 2 commits into from
May 17, 2016

Conversation

billmn
Copy link
Contributor

@billmn billmn commented May 16, 2016

@billmn billmn changed the title [5.2] Fix SparkPost doesn't send attachments #13546 [5.2] Fix SparkPost doesn't send attachments May 16, 2016
@taylorotwell taylorotwell merged commit a2058cb into laravel:5.2 May 17, 2016
@billmn billmn deleted the sparkpost-attachments branch May 25, 2016 16:48
@RicardoRamirezR
Copy link

RicardoRamirezR commented May 26, 2016

Hi there,

After this fix, I'm getting:

Call to undefined method Swift_MimePart::getFileName()
vendor/laravel/framework/src/Illuminate/Mail/Transport/SparkPostTransport.php:68

Going to laravel/framework (v5.2.31) clear the issue

Note: _children is empty

capture d ecran 2016-05-25 a 11 13 42 pm

@billmn
Copy link
Contributor Author

billmn commented May 26, 2016

@treserres Can you post your code?
I have used this code and it works fine:

Mail::send('mail', [], function($mail) {
    $mail->to('email@address.ext')->subject('Sparkpost test');
});

Also my test has an empty "_children" array:
schermata 2016-05-26 alle 09 19 49

@RicardoRamirezR
Copy link

RicardoRamirezR commented May 26, 2016

Sure, here is:

Route::get('/tm', function () {

    $message = 'Muy buenos días';

    $data = [
        'from_name' => 'rrr',
        'to_name' => 'rrr',
        'body' => $message,
    ];

    Mail::send([
            "emails.you-have-new-notification",
            "emails.you-have-new-notification-plain",
        ],
        $data,
        function ($message) {
            $message
                ->to('rrr@example.com', 'Ricardo')
                ->subject('Ricardo le ha enviado mensaje');
        }
    );
});

@eleftrik
Copy link

I have the same issue reported by @treserres

@billmn
Copy link
Contributor Author

billmn commented May 28, 2016

Call to undefined method Swift_MimePart::getFileName()

@treserres This error because the message plain version is in getChildren() array. Soon a fix.

@kezkankrayon
Copy link

I have the same issue reported by @treserres.

@taylorotwell
Copy link
Member

Does anyone have a fix?

On Sat, May 28, 2016 at 6:00 AM -0700, "kezkankrayon" notifications@github.com wrote:

I have the same issue reported by @treserres.


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or mute the thread.

@billmn
Copy link
Contributor Author

billmn commented May 28, 2016

@taylorotwell Yes but I'm testing the fix in different cases: billmn@fea984d

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

Successfully merging this pull request may close these issues.

5 participants