- Configure proper SMTP server for a test
- Replace
foo@example.com
by the valid email address that you have access into
PUT /send_mail
{
"to": ["foo@example.com"],
"body": {
"template": "/Templates/Email/hello.md",
"params":{
"name":"Iris"
}
}
}
PUT /send_mail
{
"to": ["foo@example.com"],
"body": {
"template": "/Templates/Email/hello.html",
"params":{
"name":"Iris"
}
}
}
PUT /send_mail
{
"to": ["foo1@example.com", "foo2@example.com"],
"cc": ["foo3@example.com", "foo4@example.com"],
"bcc": ["foo5@example.com", "foo6@example.com"],
"body": {
"template": "/Templates/Email/hello.html",
"params":{
"name":"Iris"
}
}
}
TSM004: Try to send an email with template as body and attachment(Subject should be taken from md body).
PUT /send_mail
{
"to": ["foo@example.com"],
"body":{
"template":"/Templates/Email/hello.md",
"params":{
"name":"Iris"
}
},
"attachments":[
{
"template":"/Templates/Email/hello.md",
"params":{
"name":"Iris"
},
"format":"pdf"
}
]
}
PUT /send_mail
{
"to": ["foo@example.com"],
"subject":"Alert-Report-Test",
"body":{
"template":"/Templates/Email/hello.html",
"params":{
"name":"Iris"
}
},
"attachments":[
{
"template":"/Templates/Email/hello.md",
"params":{
"name":"Iris"
},
"format":"pdf"
}
]
}
PUT /send_mail
{
"to": ["foo@example.com"],
"subject":"Alert-Report-Test",
"body":{
"template":"/Templates/Email/hello.md",
"params":{
"name":"Iris"
}
},
"attachments":[
{
"template":"/Templates/Email/hello.md",
"params":{
"name":"Iris"
},
"format":"html"
}
]
}
PUT /send_mail
{
"to": ["foo@example.com"],
"subject":"Alert-Report-Test",
"body":{
"template":"/Templates/Email/hello.md",
"params":{
"name":"Iris"
}
},
"attachments":[
{
"template":"/Templates/MISSING.html",
"params":{
"name":"Iris"
},
"format":"pdf"
}
]
}
PUT /send_mail
{
"to": ["foo@example.com"],
"subject":"Alert-Report-Test",
"body":{
"template":"/Templates/Email/hello.md",
"params":{
"name":"Iris"
}
},
"attachments":[
{
"template":"/Templates/MISSING.html",
"params":{
"name":"Iris"
},
"format":"pdf"
}
]
}
PUT /send_mail
{
"to": ["foo@example.com"],
"body": {
"template": "/Templates/MISSING.html"
}
}
PUT /send_mail
{
"to": ["foo@example.com"],
"body": {
}
}
EXPECTED RESPONSE:
{
"result": "ERROR",
"message": "400: data.body must contain ['template'] properties",
"uuid": "0cda7e20-046c-498c-bbea-9361e2b4dd11"
}
PUT /send_mail
{
"to": ["foo@example.com"],
"body": {
"template": "/Templates/Email/hello.html"
},
"attachments": [{
"base64": "TixOLEEsQSxBLE4sTkI=",
"content-type": "text/csv",
"filename": "c7fbbb3d716d4d7c95d3b887b288ed62.csv"
}]
}
PUT /render?format=html&template=/Templates/General/hello.html
{
"name": "Iris"
}
PUT /render?format=pdf&template=/Templates/General/hello.html
{
"name": "Iris"
}
PUT /render?format=pdf&template=/Templates/General/hello.md
{
"name": "Iris"
}
PUT /render?format=html&template=/Templates/General/hello.md
{
"name": "Iris"
}
PUT /render?format=pdf&template=/Templates/MISSING.html
{}
EXPECTED RESPONSE:
{
"result": "ERROR",
"message": "Internal Server Error",
"uuid": "e0d25e9c-8087-4981-96e4-ebb233167cef"
}
PUT /render?format=html&template=/Templates/MISSING.html
{}
EXPECTED RESPONSE:
{
"result": "ERROR",
"message": "Internal Server Error",
"uuid": "e0d25e9c-8087-4981-96e4-ebb233167cef"
}
PUT /send_slack
{
"body":{
"template":"/Templates/Slack/alert.md",
"params":{
"message":"I am testing a template",
"event":"Iris-Event"
}
}
}
PUT /send_slack
{
"body":{
"template":"/Templats/MISSING.md",
"params":{
"message":"I am testing a template",
"event":"Iris-Event"
}
}
}
EXPECTED RESPONSE:
{
"result": "ERROR",
"message": "Internal Server Error",
"uuid": "31346b56-9d46-48ee-8571-d59733a8afb8"
}