You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running into a problem with the content parameter on the SendGridEmail object. Below is a snippet of my code:
`
let resetCode = ["Reset_Code" : "945783"]
email.content = [resetCode]
let sendGridClient = req.application.sendgrid.client
do {
return try sendGridClient.send(emails: [email], on: req.eventLoop).transform(to: HTTPStatus.ok)
} catch {
req.logger.error("\(error)")
return req.eventLoop.makeFailedFuture(error)
}
`
I'm getting the following degugger message:
[ WARNING ] SendGridError(errors: Optional([SendGridKit.SendGridErrorResponse(message: Optional("The content type must be a string at least one character in length."), field: Optional("content.0.type"), help: Optional("http://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/errors.html#message.content.type")), SendGridKit.SendGridErrorResponse(message: Optional("The content value must be a string at least one character in length."), field: Optional("content.0.value"), help: Optional("http://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/errors.html#message.content.value"))])) [request-id: 421CDF29-DF11-40B9-81EA-A990C12C8267]
Clearly, the key "Reset_Code" and value "945783" are strings that are at least one character in length.
Any and all help is appreciated, thanks ahead of time!
The text was updated successfully, but these errors were encountered:
Hi all! This library is phenomenal, thank you!
I'm running into a problem with the content parameter on the SendGridEmail object. Below is a snippet of my code:
`
`
I'm getting the following degugger message:
[ WARNING ] SendGridError(errors: Optional([SendGridKit.SendGridErrorResponse(message: Optional("The content type must be a string at least one character in length."), field: Optional("content.0.type"), help: Optional("http://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/errors.html#message.content.type")), SendGridKit.SendGridErrorResponse(message: Optional("The content value must be a string at least one character in length."), field: Optional("content.0.value"), help: Optional("http://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/errors.html#message.content.value"))])) [request-id: 421CDF29-DF11-40B9-81EA-A990C12C8267]
Clearly, the key "Reset_Code" and value "945783" are strings that are at least one character in length.
Any and all help is appreciated, thanks ahead of time!
The text was updated successfully, but these errors were encountered: