it is so frustrating trying to find a way to send attachments. Why does
mail() not have this built in? Can this be done? if so why has it not been?
will this be done? it would make things so much easier if it was. If im
voicing this to the wrong person please point me in the right direction?
Thank You,
Ryan Palmer
Firstly, wrong list. php.webmaster is place for discussions about
PHP.net itself. You should move to php.general for such question. I
think that we should make it more clear, because you are not first
person doing this mistake.
Back to your question. PHP allows you to specify any email headers you
want, including attachments. This way is more flexible and makes this
function more powerfull. If you want to simplify adding attachments,
just write a wrapper or use existing one.
There are already many scripts making mail()'s use easier, in example
PHPMailer, Zend's Mail component or SwiftMailer. There are also examples
in manual showing how to attach a file in "plain" PHP. Built-in
functions are designed to be universal and flexible and this is the reason.
Cheers,
Maciej Sobaczewski.
--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php