Sending Email

0
158
views

Sending email in CodeIgniter is much easier. You also configure the preferences regarding email in CodeIgniter. CodeIgniter provides following features for sending emails :
− Multiple Protocols − Mail, Sendmail, and SMTP
– TLS and SSL Encryption for SMTP
– Multiple recipients
– CC and BCCs
– HTML or Plaintext email
– Attachments
– Word wrapping
– Priorities
– BCC Batch Mode, enabling large email lists to be broken into small BCC batches.
– Email Debugging tools

Sending Email

Example

Create a controller file Email.php and save it in application/controller/learning/Email.php.

Create a view file called email_form.php and save it at application/views/learning/email_form.php

Use the following URL in the browser to execute the above example.

Notes :
1. extension=php_openssl.dll must be active.
2. When you add library email in autoload.php, you must set config like this

3. If you use gmail, you must set less secure on, https://support.google.com/accounts/answer/6010255?hl=en

Reference :
https://codeigniter.com/user_guide/libraries/email.html

LEAVE A REPLY

Please enter your name here
Please enter your comment!