Skip to content

Commit

Permalink
Email library and email config
Browse files Browse the repository at this point in the history
  • Loading branch information
mpmont committed May 19, 2020
1 parent f0747c8 commit cfe1447
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ If you find error or whatever just fork it and send me a pull request.
| ci_entity | Create a new Entity class |
| ci_cache | Save into the cache for x minutes |
| ci_getcache | Grab an instance of the cache engine directly through the Services class |
| ci_email | Basic example demonstrating how you might send email |
| ci_email_config | Basic email Preferences |

# Contributors

Expand Down
18 changes: 18 additions & 0 deletions ci4_email_class.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<snippet>
<content><![CDATA[
\$email = \Config\Services::email();
\$email->setFrom('${1:[email protected]}', '${2:Name}');
\$email->setTo('${3:[email protected]}');
\$email->setCC('${4:[email protected]}');
\$email->setBCC('${5:[email protected]}');
\$email->setSubject('${6:subject}');
\$email->setMessage('${7:message}');
\$email->send();
]]></content>
<tabTrigger>ci_email</tabTrigger>
<scope>source.php</scope>
<description>CI4 - Basic example demonstrating how you might send email</description>
</snippet>
16 changes: 16 additions & 0 deletions ci4_email_config.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<snippet>
<content><![CDATA[
$config['protocol'] = '${1:sendmail}';
$config['mailPath'] = '${2:/usr/sbin/sendmail}';
$config['charset'] = '${3:utf-8}';
$config['wordWrap'] = ${4:true};
$config['userAgent'] = ${4:CodeIgniter};
$config['mailType'] = ${5:text};
$config['validate'] = ${6:true};
$email->initialize($config);
]]></content>
<tabTrigger>ci_email_config</tabTrigger>
<scope>source.php</scope>
<description>CI4 - Basic email Preferences</description>
</snippet>

0 comments on commit cfe1447

Please sign in to comment.