1.

Explain CodeIgniter E-mail library. How to send an E-mail using CodeIgniter?

Answer»
  • FEATURES of Email Class in CodeIgniter are given below:
    • Multiple protocols such as Mail, SENDMAIL, and SMTP
    • TLS and SSL Encryption for SMTP
    • CC and BCCs
    • Multiple recipients
    • Attachments
    • HTML or Plain-text email
    • Priorities
    • Word wrapping
    • BCC Batch Mode, enabling LARGER e-mail lists to be broken into smaller BCC batches
    • Email Debugging tools
  • SENDING Email:
    Sending an email is a simple process here. You can configure an email on the fly or set your preferences in the app/Config/Email.php FILE. A basic example for demonstrating how you might send email is given below:
$email = \Config\Services::email();$email->setFrom('your@interviewbit.com', 'Your Name');$email->setTo('someone@interviewbit.com');$email->setCC('another@another-example.com');$email->setBCC('them@their-example.com');$email->setSubject('Email Test');$email->setMessage('Testing the email class.');$email->send();


Discussion

No Comment Found