fuel / email

Fuel PHP Framework - Fuel v1.x Email library
60 stars 38 forks source link

Proposal : Email attach_paths default #24

Closed billmn closed 12 years ago

billmn commented 12 years ago

I think it can be useful that "attach_paths" in email config file use :

// absolute path
'',

// fuelphp asset path
'__assets__',

// relative to docroot.
DOCROOT,

So a user can attach a file, without add the default asset path ...

$email->attach(\Asset::get_file('logo.gif', 'img'), true, 'cid:logo');

The config array key "assets" is only an example :)

frankdejonge commented 12 years ago

I can see where you're going with this, but that makes the email package coupled with the Asset class, which is way to big of a downer when you look at what 'problem' it's trying to solve. You can use the Asset class in your view, and let the package auto_include the file. That way you'll still have the advantage of using the Asset class, without the coupling. So I'll have to say no to this one.