Skip to content

SparkPost doesn't send attachments #13546

Closed
@bobbybouwmann

Description

Hi,

As many other developers I migrated my application from Mandrill to SparkPost. Never had any issues with Mandrill, but I can' t send attachments.

I have a bit of example code here, but that is straight forward with Laravel. This does work with Mandrill, Mailgun, and the SMTP drivers. However SparkPost send the email, but forgets the attachments.

Route::get('test/mail', function () {
        Mail::send('emails.test', [], function ($message) {
        $message->to('email@domain.com')
            ->subject('Test mail')
            ->attach(storage_path('files') . '/' . 'somefile.pdf', ['as' => 'Some File']);
    });

    return 'Done';
});

I also have a support ticket open at SparkPost, but this can be an issue with Laravel or SparkPost...

Is this a known issue?

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions