mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 07:17:04 +00:00
Merge pull request #34611 from CalvinMcGee/nodemailer-mailgun-transport-upgrade
@types/nodemailer-mailgun-transport Added options for 1.4
This commit is contained in:
+6
-1
@@ -1,6 +1,7 @@
|
||||
// Type definitions for nodemailer-mailgun-transport 1.3
|
||||
// Type definitions for nodemailer-mailgun-transport 1.4
|
||||
// Project: https://github.com/orliesaurus/nodemailer-mailgun-transport, http://mailgun.com
|
||||
// Definitions by: Oto Ciulis <https://github.com/otociulis>
|
||||
// Joachim Wallsin <https://github.com/calvinmcgee>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -16,6 +17,10 @@ declare namespace mailgunTransport {
|
||||
|
||||
interface Options {
|
||||
auth: AuthOptions;
|
||||
proxy?: string | boolean;
|
||||
host?: string;
|
||||
protocol?: string;
|
||||
port?: number;
|
||||
}
|
||||
|
||||
type MailOptions = Mail.Options;
|
||||
|
||||
@@ -14,7 +14,15 @@ const optsWithDomain: mailgunTransport.Options = {
|
||||
}
|
||||
};
|
||||
|
||||
const transport: nodemailer.Transporter = nodemailer.createTransport(mailgunTransport(optsWithDomain));
|
||||
const optsWithHost: mailgunTransport.Options = {
|
||||
auth: {
|
||||
api_key: "harry",
|
||||
domain: "http://www.foo.com"
|
||||
},
|
||||
host: 'api.eu.mailgun.net'
|
||||
};
|
||||
|
||||
const transport: nodemailer.Transporter = nodemailer.createTransport(mailgunTransport(optsWithHost));
|
||||
|
||||
// setup e-mail data with unicode symbols
|
||||
const mailOptions: nodemailer.SendMailOptions = {
|
||||
|
||||
Reference in New Issue
Block a user