Page 1 of 1

a good class for php mail with attachment

Posted: Tue Feb 13, 2007 12:28 pm
by PHPycho
can anybody jot down the good class for php
that has a simple message field, subject,email, and attachemnet fields..
Thanks in advance...

Posted: Tue Feb 13, 2007 12:36 pm
by Luke
well there is not going to be any one class that will include the form as well as send the mail because if one class did all that, it would not be oop. It would be spaghetti crap code. What I will suggest is that you build a form (standard html), post it to a php page, grab the $_POST vars, validate, and then use swiftmailer to send the email w/attachment. PHP and Swiftmailer both have excellent documentation and we here at devnet support both. If you have any questions, first check here, then here, then here, and then if that fails, ask in this thread.

Put together at least SOME code and I'll even help you with it. :D

Re: a good class for php mail with attachment

Posted: Tue Feb 13, 2007 6:06 pm
by RobertGonzalez
PHPycho wrote:can anybody jot down the good class for php
that has a simple message field, subject,email, and attachemnet fields..
Thanks in advance...
No. But we can tell you to use Swiftmailer as your mailing application.