Skip to content

Widget send emails with validate e-mail recipient

License

Notifications You must be signed in to change notification settings

pceuropa/yii2-email

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Email autoresponder

This extension help send emails. In this version (1.0.1) only text messsage.

Installation

The preferred way to install this extension is through composer.

Either run

composer require pceuropa/yii2-email "*"

or add

"pceuropa/yii2-email": "*"

to the require section of your composer.json file.

Configuration

Yii2 config file:

'components' => [
'mailer' => [
			'class' => 'yii\swiftmailer\Mailer',
			'viewPath' => '@common/mail',    // basic Yii2: @app/mail
			'useFileTransport' => false,
			'transport' => [
				'class' => 'Swift_SmtpTransport',
				'host' => 'smtp.gmail.com',
				'username' => 'info@gmail.com',
				'password' => 'password',
				'port' => '587',		 // or 465
				'encryption' => 'tls',   // or ssl
			]
    ],
]

Usage

Once the extension is installed, simply use it in your code by :

use pceuropa\email\Send;

Send::widget([
		'from' => 'info@pceuropa.net',
		'to' => 'info@destiny.pl',
		'subject' => 'subject email',
		'textBody' => 'Hello Lorem Ipsum. Bye',
	]); 

About

Widget send emails with validate e-mail recipient

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages