Skip to content

Cannot send email with attachment via api #1385

Open
@wk-as1

Description

@wk-as1

I'm trying to send email with attachment via api, as below:

EMAIL=[email protected]&SUBJECT=Test&TAGS[FOO]=bar&TAGS[TEST]=example&ATTACHMENTS=[{filename:'LICENSE.txt',path:'https://raw.github.com/nodemailer/nodemailer/master/LICENSE'}]

Or using local path:
[{filename:'LICENSE.txt',path:'/var/www/mailtrain/server/files/uploaded/LICENSE.txt'}]

Response is: {}
No email received. Nothing in logs.
Email is correctly sent and received when removing ATTACHMENTS field.

Please advice.

Full curl:

curl --location 'https://host/api/templates/6/send?access_token=xxxxxx'
--header 'Content-Type: application/x-www-form-urlencoded'
--data-raw 'EMAIL=[email protected]&SUBJECT=Test&TAGS[FOO]=bar&TAGS[TEST]=example&ATTACHMENTS=[{filename:'''LICENSE.txt''',path:'''https://raw.github.com/nodemailer/nodemailer/master/LICENSE'''}]'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions