Jump to content

Send mail with attachment


Darkness Soul

Recommended Posts

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
Link to comment
https://forums.phpfreaks.com/topic/6809-send-mail-with-attachment/
Share on other sites

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.