txthinking/Mailer ? reverse-engineered prompt
Reverse engineered prompt
Build me a lightweight PHP library for sending email through SMTP.
I want it to be easy to use with Composer, and feel simple enough that I can create a mailer, point it at an SMTP server, add login details, set the sender and recipients, write a subject and body, attach a file if needed, then send the message and get back whether it worked.
Please keep it small and practical, with a clean API that makes basic email sending straightforward. It should support normal mail sending, allow a fake from name and email if needed, and include a few working examples so I can copy and paste them. If there are any edge cases or current best practices I should know about, look up the latest docs online if you need to. Also make sure there are tests so I can see how it behaves.
Are you gonna build this?
make sure you review the code using coderabbit