Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
WE.SwiftMailerSpool
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Labels
Merge Requests
0
Merge Requests
0
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
packages
WE.SwiftMailerSpool
Commits
80eecf34
Commit
80eecf34
authored
Jan 28, 2016
by
Simon Gadient
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DOC] Add the readme to get started
refs KIME-3340
parent
b74ffac6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
0 deletions
+43
-0
README.md
README.md
+43
-0
No files found.
README.md
0 → 100644
View file @
80eecf34
This Flow package extends the
[
Neos Swift Mailer
](
https://github.com/neos/swiftmailer
)
by a spool for asynchronous mailing.
## Configuration
The package is pre-configured to use a the file spool:
WE:
SwiftMailerSpool:
spool:
type: 'Swift_FileSpool'
options: []
arguments:
path: %FLOW_PATH_DATA%/SwiftMailerSpool/
## Usage
Different from the
[
Neos Swift Mailer
](
https://github.com/neos/swiftmailer
)
, a
`\Swift_Message`
has to be created instead
of using the
`\TYPO3\SwiftMailer\Message`
object. This is due to a problems on the serialization of the message that
happens in the
`\FileSpool`
as the serialized
`\TYPO3\SwiftMailer\Message`
does not include its parent properties of the
`\Swift_Message`
.
The process is the same as with the normal SwiftMailer library.
Inject the mailer interface which now is a
`\Swift_SpoolTransport`
object:
/**
* @Flow\Inject
* @var \TYPO3\SwiftMailer\MailerInterface
*/
protected $mailer;
Create the message:
$mail = new \Swift_Message();
Send the message with the mailer:
$this->mailer->send($mail);
Now, the mail is in the spool and can really be sent by the command:
./flow swiftmailerspool:flush
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