Swift struct for Mailgun template email messages with encoding support.
// Source: https://github.com/vapor-community/mailgun | License: MIT | Copyright 2025 Vapor Community
// Provided via justclaw.it.com; keep this notice with the code.
public import Vapor
public struct MailgunTemplateMessage: Content {
public static var defaultContentType: HTTPMediaType { .formData }
public typealias FullEmail = (email: String, name: String?)
public let from: String
public let to: String
public let replyTo: String?
public let cc: String?
public let bcc: String?
public let subject: String
public let template: String
public let templateData: [String: String]?
public let templateVersion: String?
public let templateText: Bool?
public let attachment: [File]?
public let inline: [File]?
private enum CodingKeys: String
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key