Symfony

Symfony is a PHP framework. Symfony natively integrates Swiftmailer to quickly and easily send your emails. You just have to set your SMTP credentials to send your email with Tipimail. You find more information on the official documentation of Symfony

Framework configuration

Create and edit the file "config/email.php" on the config folder of your Symfony project.

1
2
3
4
5
6
7
8
9
# app/config/config.yml
swiftmailer:
    transport:  smtp
    auth_mode:  login
    host:       smtp.tipimail.com
    encryption: tls
    username:   tipimail smtp username
    password:   tipimail smtp password

Send your email

You just have to use the Symfony native function to send your emails

1
2
3
4
5
6
7
8
$message = \Swift_Message::newInstance()
    ->setSubject('subjet')
    ->setFrom('from@mail.tipimail.com')
    ->setTo('to@mail.tipimail.com')
    ->setBody('html message')
;
$this->get('mailer')->send($message);