zc-email-service

1.0.3 • Public • Published

zc-email-service

intruoduce

  1. zhice teamson company development this module and all right reserved!
  2. 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!");

	}

}

Readme

Keywords

Package Sidebar

Install

npm i zc-email-service

Weekly Downloads

1

Version

1.0.3

License

ISC

Unpacked Size

15.1 kB

Total Files

11

Last publish

Collaborators

  • 892280082