Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
38a6b4fa
Commit
38a6b4fa
authored
Jun 04, 2014
by
Klimov Paul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Docs about mail debugging added
parent
df6b7335
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
tutorial-mailing.md
docs/guide/tutorial-mailing.md
+17
-0
No files found.
docs/guide/tutorial-mailing.md
View file @
38a6b4fa
...
...
@@ -204,6 +204,23 @@ Then inside view file you can use following code:
```
Testing and debugging
---------------------
Developer often a to check, what actual emails are sent by application, what was their content and so on.
Such ability is granted by Yii via
`yii\mail\BaseMailer::useFileTransport`
. If enabled, this option enforces
saving mail message data into the local files instead of regular sending. These files will be saved under
`yii\mail\BaseMailer::fileTransportPath`
, which is '@runtime/mail' by default.
> Note: you can either save messages to the file or send them to actual recipients, but can not do both simultaneously.
Mail message file can be opened by regular text file editor, so you can browse actual message headers, content and so on.
This mechanism amy prove itself, while debugging application or running unit test.
> Note: mail message file content is composed via `\yii\mail\MessageInterface::toString()`, so it depends on actual
mail extension you are using in your application.
Creating your own mail solution
-------------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment