Strapi cloud and mailgun templates

I’m trying to use the mailgun provider and strapi cloud. I want to use the templates from Mailgun but everytime I send an email I got an error:

URL: https://cloud-mailer.strapi.io/send
Method: POST
Payload:

{
    "to": "info@test.co",
    "from": "no-reply@test.co",
    "replyTo": "info@test.co",
    // "cc": "test2@gmail.com",
    "bcc": "test@gmail.com",
    "subject": "New user",
    // "text": "a",
    "template": "new-user"
    // "h:X-Mailgun-Variables": "{'email': 'test@test.com'}"
}

Response

{
    "name": "UnprocessableEntity",
    "message": "The passed data isn't valid.",
    "details": [
        {
            "path": "text",
            "type": "required",
            "errors": [
                "text is a required field"
            ]
        }
    ]
}

But if I include the text it ignores the template :frowning: Any suggestions?

you commented out text

// “text”: “a”,

text is a required field

I’ve posted the wrong payload. Apologies

{
    "to": "info@test.co",
    "from": "no-reply@test.co",
    "replyTo": "info@test.co",
    "bcc": "test@gmail.com",
    "subject": "New user",
    "text": "a",
    "template": "new-user"
    "h:X-Mailgun-Variables": "{'email': 'test@test.com'}"
}

Then I am not sure what is causing this

Since this seems to be a issue you are having in strapi cloud I recommand to open a ticket for it trough the strapi cloud issue button

1 Like