Introduce base classes for new Email implementation.
- Class
BP_Email represents an email; the bits you see in your email client like the subject, message, recipients. It also encapsulates custom email headers and tokens.
- Class
BP_Email_Recipient represents an email recipient. It holds an email address and recipient name. If the class is instantiated with a WordPress user ID, then it also has a WP_User reference.
- Interface
BP_Email_Delivery is what mail delivery services will use to implement support for emails sent by BuddyPress.
- Class
BP_PHPMailer implements BP_Email_Delivery for PHPMailer.
See #6592. Props timersys, mercime, boonebgorges, hnla, DJPaul.