Cara menggunakan php mail multiple recipients

CodeIgniter

CodeIgniter’s robust Email Class supports the following features:

  • 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

Using the Email Library

Sending Email

Sending email is not only simple, but you can configure it on the fly or set your preferences in the app/Config/Email.php file.

Here is a basic example demonstrating how you might send email:

Setting Email Preferences

There are 21 different preferences available to tailor how your email messages are sent. You can either set them manually as described here, or automatically via preferences stored in your config file, described below:

Preferences are set by passing an array of preference values to the email initialize method. Here is an example of how you might set some preferences:

Bài mới nhất

Chủ Đề