10000 [Mailer] Unable to send email with only attachment part · Issue #32811 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Mailer] Unable to send email with only attachment part #32811

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

Closed
srsbiz opened this issue Jul 30, 2019 · 0 comments
Closed

[Mailer] Unable to send email with only attachment part #32811

srsbiz opened this issue Jul 30, 2019 · 0 comments

Comments

@srsbiz
Copy link
Contributor
srsbiz commented Jul 30, 2019

Symfony version(s) affected: 4.3.3

Description
Current logic
https://github.com/symfony/mime/blob/c71b839cc39d446f14afaef771c16f221d85c331/Email.php#L424
requires to have either text or html part before adding attachment part
https://github.com/symfony/mime/blob/c71b839cc39d446f14afaef771c16f221d85c331/Email.php#L443
which effectively prevents sending email message with only attachments.

How to reproduce

$email = (new Email())
    ->to('foo@example.com')
    ->subject('See attached file')
    ->attachFromPath(__FILE__, 'test.php')
;
@srsbiz srsbiz changed the title [Mailer] Unable to send email with only attachement part [Mailer] Unable to send email with only attachment part Jul 30, 2019
srsbiz added a commit to srsbiz/symfony that referenced this issue Jul 30, 2019
@fabpot fabpot closed this as completed Aug 4, 2019
fabpot added a commit that referenced this issue Aug 4, 2019
This PR was squashed before being merged into the 4.3 branch (closes #32814).

Discussion
----------

Create mailBody with only attachments part present

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #32811
| License       | MIT

Commits
-------

b500f92 Create mailBody with only attachments part present
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
BB8
0