halojoy/PHP-SMTP-Mailer ? reverse-engineered prompt
Reverse engineered prompt
Build me a simple PHP email sender that uses SMTP and feels easy to drop into an existing project.
I want to be able to set up my mail server details once, then send emails with a small class. It should support login with username and password, TLS and SSL, plain text or HTML messages, and file attachments. Please include basic support for To, Cc, Bcc, Reply To, and a way to turn on debug logging so I can see what is happening if email sending fails.
Also add a tiny setup script for saving the SMTP settings, plus a minimal example that shows how to send one message and a second example with attachments. Keep it lightweight and straightforward, with UTF 8 as the default, but let me change it if needed. Make sure the code is clean and easy to understand so I can use it without much setup. If anything is unclear, look up current docs online if you need to.
Are you gonna build this?
make sure you review the code using coderabbit