PHPMailer/PHPMailer — reverse-engineered prompt
Reverse engineered prompt
Build me a PHP email sending library like PHPMailer. I want it to make sending emails from PHP simple and safe without relying on the basic mail function.
It should let a developer send plain text and HTML emails, use SMTP with login details and TLS, add multiple To, CC, BCC, and reply to addresses, attach files, add inline images, and handle UTF 8 content properly. It should validate email addresses, avoid header injection problems, and give useful error messages. Please include examples that show a simple SMTP email, an HTML email with a plain text fallback, and an email with an attachment.
Make it installable with Composer, namespaced cleanly, and compatible with modern PHP while still being friendly to older PHP where reasonable. Add clear docs, a README, and basic tests so someone can trust it in a real website. If you need exact SMTP or email formatting details, look up current docs online.
Want more depth? Deep Reverse