1.0.3 • Published 2 years ago
zc-email-service v1.0.3
zc-email-service
intruoduce
- zhice teamson company development this module and all right reserved!
- attention ! just suport the spring-ioc framework.
install
npm instlal zc-email-service
usage
1.set the configuration file
file path: ${Project}/resource/ZcEmailService.json
basic config:
{
"email-user":"234234234fgvdf",
"email-pass":"2342xcvx",
}
advance config
- email-assert: set the static html page directory.the default value is emailAssert no manual processing is required!
{
"email-assert":"emailAssert"
}
2. load email module at launch.
const {SpringBoot} = require("spring-ioc")
const {ZcEmailServiceScaner} = require("zc-email-service")
new SpringBoot({
srcList:["./app"],
moduleList:[ZcEmailServiceScaner]
}).run();
3. call in the spring container!
//@SpringBoot
class Application {
//just copy the code of next line is done!
//@Autowired
zcEmailService;
async main(){
this.zcEmailService.sendHtml("test page","hello.html",{msg:"hello world!"});
this.zcEmailService.sendMsg("test msg","this message just for test.no other meaning!");
}
}