Darkness Soul Posted April 7, 2006 Share Posted April 7, 2006 Hi guys,I've performed a search but, unhappy, don't find topics with this problem.I need to send a mail.. like newsletter, but with attachment!I read somewhere about use mimetype to send images, but long time ago.. to send files, any kind of files.. what I suppose to do?Thank you.D.Soul Quote Link to comment https://forums.phpfreaks.com/topic/6809-send-mail-with-attachment/ Share on other sites More sharing options...
zq29 Posted April 7, 2006 Share Posted April 7, 2006 I'm not sure of how it can be done with the standard mail() function, but there is a class about called 'phpmailer' that can send mail with attachments. Quote Link to comment https://forums.phpfreaks.com/topic/6809-send-mail-with-attachment/#findComment-24790 Share on other sites More sharing options...
Darkness Soul Posted April 7, 2006 Author Share Posted April 7, 2006 I've built a code, and its apper work fine.. dont clue here because it have 215 lines (with coments), so i can write a tutorial if someone need.. but i still have a problem..I need to know what kind of file the mail is attaching.. my code to do this:[code] if ( strtoupper ( $arq_extensao ) == 'PDF' ) { $arq_aplicacao = 'pdf'; } elseif ( strtoupper ( $arq_extensao ) == 'DOC' ) { $arq_aplicacao = 'msword'; }[/code]But, i need a function to take the file extension ($arq_extensao).. this if will filter the mime "application/[type]".Have some function to retrieve these extension?Thanks, D.Soul Quote Link to comment https://forums.phpfreaks.com/topic/6809-send-mail-with-attachment/#findComment-24830 Share on other sites More sharing options...
kenrbnsn Posted April 7, 2006 Share Posted April 7, 2006 Take a look at the function [a href=\"http://www.php.net/mime_content_type\" target=\"_blank\"]mime_content_type[/a]().Ken Quote Link to comment https://forums.phpfreaks.com/topic/6809-send-mail-with-attachment/#findComment-24849 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.