Skip to content

Commit fc86b41

Browse files
committed
Mailing
1 parent 18dc1a7 commit fc86b41

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

SUMMARY.md

+1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@
1313
* [DDD (Domain Driven Design)](in-depth_documentation/domain_driven_design_and_orm.md)
1414
* [DDD: Collections](in-depth_documentation/ddd_collections.md)
1515
* [DatabaseMigrator](in-depth_documentation/databasemigrator.md)
16+
* [Mailing](in-depth_documentation/mailing.md)
1617
* [Versions](versions/README.md)
1718

in-depth_documentation/mailing.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Mailing
2+
3+
PHPFrameworks comes with tools to send mails.
4+
5+
## Basic usage
6+
7+
$mailService = new \AppZap\PHPFramework\Mail\MailService();
8+
$message = \AppZap\PHPFramework\Mail\MailMessage::newInstance();
9+
$message->addTo($recipient);
10+
$message->setFrom($senderMail, $senderName);
11+
$message->setSubject($subject);
12+
$message->setBody($content);
13+
$mailService->send($message);
14+
15+
## Background
16+
17+
We run [swiftmailer](https://github.com/swiftmailer/swiftmailer) under the hood to send mails. The `MailMessage` class is simply extending the `Swift_Message` class. Therefore you can use any [options](http://swiftmailer.org/docs/messages.html) it has.
18+
19+
The `MailService` is completely configurable throught. `settings.ini` options. See [Configuration](in-depth_documentation/configuration.md) for details.

0 commit comments

Comments
 (0)