Skip to content

Commit 93e1120

Browse files
authored
Merge pull request #9 from Darkvador-a/master
docs: add alias in config for symfony 3
2 parents 62204c6 + 46154e9 commit 93e1120

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,21 @@ expert_coder_swiftmailer_send_grid:
4141
api_key: %sendgrid_api_key%
4242
categories: [my_category] # optional, will be added to all mails sent
4343
```
44+
#### Symfony 3
4445
46+
Since Symfony 3.2, you must name the custom transport service swiftmailer.mailer.transport.< name >
47+
48+
*services.yml*
49+
```yml
50+
services:
51+
swiftmailer.mailer.transport.expertcoder_swift_mailer.send_grid.transport:
52+
alias: expertcoder_swift_mailer.send_grid.transport
53+
```
54+
*config.yml*
55+
```yml
56+
imports:
57+
- { resource: services.yml }
58+
```
4559
## Important !
4660
4761
Following RFC 1341, section 7.2, if either `text/html` or `text/plain` are to be sent in your email: `text/plain` needs to be first, followed by `text/html`, followed by any other content.

0 commit comments

Comments
 (0)