gar1606 Posted June 2, 2017 Share Posted June 2, 2017 If I have built a mail class (I made it before I started using processwire), should I make it a module or just include it and go from there? Link to comment Share on other sites More sharing options...
Zeka Posted June 2, 2017 Share Posted June 2, 2017 I would prefer module because it's more PW way. It worth to mention that there is WireMail module that handles sending of email in PW. Also, there is WireMail SMTP that extends mentioned class. You can go with a similar approach: create a module that will extend WireMail class by hooks where you can specify some specific things from your custom mail class. 2 Link to comment Share on other sites More sharing options...
gar1606 Posted June 2, 2017 Author Share Posted June 2, 2017 I need the mail class (or module) to be able to handle attachments... does wiremail allow for that too? Edit: I am slow, yes it does... I'll check it out... thanks Zeka Link to comment Share on other sites More sharing options...
LostKobrakai Posted June 2, 2017 Share Posted June 2, 2017 In general I'd say build classes as independent as possible from processwire and to integrate it in PW just add a module as wrapper around your class, which does tie any processwire specifics (hook / module config / process interface / …) into what your class does on it's own. 4 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now