File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,21 @@ an email is pretty straightforward::
123
123
}
124
124
125
125
To keep things decoupled, the email body has been stored in a template and
126
- rendered with the ``renderView() `` method.
126
+ rendered with the ``renderView() `` method. The ``registration.html.twig ``
127
+ might look something like this:
128
+
129
+ .. code-block :: html+jinja
130
+
131
+ {# app/Resources/views/Emails/registration.html.twig #}
132
+ <h3>You did it! You registered!</h3>
133
+
134
+ {# example, assuming you have a route named "login" $}
135
+ To login, go to: {{ url('login') }}.
136
+
137
+ Thanks!
138
+
139
+ {# Makes an absolute URL to the /images/logo.png file #}
140
+ <img src="{{ absolute_url(asset('images/logo.png')) }}"
127
141
128
142
The ``$message `` object supports many more options, such as including attachments,
129
143
adding HTML content, and much more. Fortunately, Swift Mailer covers the topic
You can’t perform that action at this time.
0 commit comments