new doc
This commit is contained in:
		| @@ -45,22 +45,22 @@ router.get("/messages/:alias/:tribeId", (req, res) => { | |||||||
|  * @api {POST} adminapi/notifications/sendmail/:tribe/:template - Send personnalize emails |  * @api {POST} adminapi/notifications/sendmail/:tribe/:template - Send personnalize emails | ||||||
|  * @apiName Sendmail |  * @apiName Sendmail | ||||||
|  * @apiDescription Send campain personnalized email by rendering a template store in ../../{tribe}/template/{template}.js containing email key like html, subject, text, cc,.. as mustache templatewith blank test replaced by data.<br> It use a smtp in conf global or in /itm/{tribe}.json that must have valid parameter emailcontact must be authorized by the smtp <br> |  * @apiDescription Send campain personnalized email by rendering a template store in ../../{tribe}/template/{template}.js containing email key like html, subject, text, cc,.. as mustache templatewith blank test replaced by data.<br> It use a smtp in conf global or in /itm/{tribe}.json that must have valid parameter emailcontact must be authorized by the smtp <br> | ||||||
|    *  "emailcontact": "noreply@smatchit.io", |    *  "emailcontact": "noreply@smatchit.io",<br> | ||||||
|    *  "smtp": { |    *  "smtp": {<br> | ||||||
|    *    "host": "smtp-relay.brevo.com", |    *    "host": "smtp-relay.brevo.com",<br> | ||||||
|    *    "port": 587, |    *    "port": 587,<br> | ||||||
|    *    "secure": false, |    *    "secure": false,<br> | ||||||
|    *    "auth": { |    *    "auth": { | ||||||
|    *     "user": "xx", |    *     "user": "xx", | ||||||
|    *    "pass": "yy" |    *    "pass": "yy" | ||||||
|    *    } |    *    }<br> | ||||||
|    *   } |    *   } | ||||||
|  |  | ||||||
|  * @apiGroup Notifications |  * @apiGroup Notifications | ||||||
|  * |  * | ||||||
|  * @apiParam {string} template that must exist in {tribe}/template/{template}_{lg}.js that contain all email component (html, text, attachement...) |  * @apiParam {string} template that must exist in {tribe}/template/{template}_{lg}.js that contain all email component (html, text, attachement...) | ||||||
|  * @apiParam {string} tribe  |  * @apiParam {string} tribe  | ||||||
|  * @apiBody {object} emailstosend {emailsto:[{to:[emailslist], cc:[],bcc:[],attachments:[] and any key:value specific for this email}], key:value commonto all email that will be include in each email} each item af emailsto is a mail that will be send. If one email of emailsto[].to is not valid then it will be store in result.fail:[{to:emailerror,err:["errorformat"]}], then for well formated email, the result of an email will be store in results.success:[{to:emailsto[].to.emailslist.join(","),status:smtp status}] |  * @apiBody {object} emailstosend {emailsto:[{to:[emailslist], cc:[],bcc:[],attachments:[] and any key:value specific for this email}], key:value common to all email that will be include in each email} each item af emailsto is a mail that will be send.<br> If one email of emailsto[].to is not valid then it will be store in result.fail:[{to:emailerror,err:["errorformat"]}], then for well formated email, the result of an email will be store in results.success:[{to:emailsto[].to.emailslist.join(","),status:smtp status}] | ||||||
|  * |  * | ||||||
|  * @apiSuccess {object}  notif content |  * @apiSuccess {object}  notif content | ||||||
|  * @apiSuccessExample {json} Success-Response: |  * @apiSuccessExample {json} Success-Response: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user