Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/nodemailer/nodemailer
/ functions
Functions
546 in github.com/nodemailer/nodemailer
⨍
Functions
546
◇
Types & classes
191
↓ 82 callers
Method
on
Registers an event listener, the transport may emit 'log', 'error', 'idle' and 'clear'
src/mailer/index.ts:164
↓ 60 callers
Method
replace
* Replaces current node with another node * * @param node Replacement node * @return Replacement node
src/mime-node/index.ts:476
↓ 36 callers
Method
close
()
test/smtp-transport/smtp-fixtures.ts:95
↓ 29 callers
Method
sendMail
(data: SendMailOptions, callback: SendMailCallback<T> | null = null)
src/mailer/index.ts:362
↓ 28 callers
Method
parse
* Parses cookie string from the 'Set-Cookie:' header * * @param cookieStr String from the 'Set-Cookie:' header * @returns Cookie object
src/fetch/cookies.ts:125
↓ 24 callers
Method
error
(data?: LogEntry, message?: string, ...args: any[])
src/shared/index.ts:138
↓ 23 callers
Method
info
(data?: LogEntry, message?: string, ...args: any[])
src/shared/index.ts:136
↓ 23 callers
Method
match
* Checks if a cookie object is valid for a specified URL * * @param cookie Cookie object * @param url URL to check for * @returns
src/fetch/cookies.ts:194
↓ 20 callers
Method
send
Hands a message to the transport, the callback receives the transport result
src/mailer/index.ts:156
↓ 19 callers
Function
resolve
(from: string, to: string)
src/shared/url.ts:234
↓ 18 callers
Method
_formatError
(message: Error | string, type?: string | false, response?: string | false, command?: string | false)
src/smtp-connection/index.ts:1320
↓ 18 callers
Method
debug
(data?: LogEntry, message?: string, ...args: any[])
src/shared/index.ts:135
↓ 17 callers
Method
get
(key: K)
src/mailer/index.ts:692
↓ 16 callers
Method
resolve
Marks the user as authenticated
src/smtp-connection/index.ts:147
↓ 15 callers
Method
_onError
* 'error' listener for the socket * * @event * @param err Error object * @param type Error name
src/smtp-connection/index.ts:1296
↓ 15 callers
Method
set
(key: K, value: MailMeta[K])
src/mailer/index.ts:688
↓ 14 callers
Method
_sendCommand
* Send a command to the server, append \r\n * * @param str String to be sent to the server * @param logStr Optional string to be used f
src/smtp-connection/index.ts:1558
↓ 14 callers
Method
connect
(ipaddress: string)
src/mailer/index.ts:588
↓ 13 callers
Method
log
(...args: any[])
src/shared/index.ts:118
↓ 11 callers
Method
close
Closes the transport
src/mailer/index.ts:160
↓ 10 callers
Method
messageId
* Returns Message-Id value. If it does not exist, then creates one * * @return Message-Id value
src/mime-node/index.ts:1214
↓ 9 callers
Method
add
* Adds (or updates/removes if needed) a cookie object to the cookie storage * * @param cookie Cookie value to be stored
src/fetch/cookies.ts:226
↓ 9 callers
Method
createReadStream
* Streams the rfc2822 message from the current node. If this is a root node, * mandatory header fields are set if missing (Date, Message-Id, MIME
src/mime-node/index.ts:899
↓ 9 callers
Method
getEnvelope
* Generates and returns SMTP envelope with the sender address and a list of recipients addresses * * @return SMTP envelope in the form of {f
src/mime-node/index.ts:1176
↓ 9 callers
Method
messageId
()
test/sendmail/sendmail-test.ts:30
↓ 9 callers
Method
setHeader
* Sets a header value. If the value for selected key exists, it is overwritten. * You can set multiple values as well by using [{key:'', value:''
src/mime-node/index.ts:526
↓ 9 callers
Method
verify
Checks the configuration, the SMTP transports connect and authenticate for it
src/mailer/index.ts:158
↓ 8 callers
Method
compile
* Builds MimeNode instance
src/mail-composer/index.ts:193
↓ 8 callers
Method
login
* Authenticate user
src/smtp-connection/index.ts:928
↓ 7 callers
Method
_parseAddresses
* Parses addresses. Takes in a single address or an array or an * array of address arrays (eg. To: [[first group], [second group],...]) *
src/mime-node/index.ts:1347
↓ 7 callers
Method
close
* Closes the connection to the server
src/smtp-connection/index.ts:868
↓ 7 callers
Function
isProtoKey
(key: string)
src/shared/objects.ts:21
↓ 6 callers
Method
_convertAddresses
* Rebuilds address object using punycode and other adjustments * * @param addresses An array of address objects * @param [uniqueList] A
src/mime-node/index.ts:1569
↓ 6 callers
Function
captureLogger
()
test/smtp-transport/smtp-fixtures.ts:79
↓ 6 callers
Method
getEnvelope
()
test/sendmail/sendmail-test.ts:26
↓ 6 callers
Function
nmfetch
(url: string, options?: FetchOptions)
src/fetch/index.ts:113
↓ 5 callers
Method
_getTextEncoding
* Detects best mime encoding for a text value * * @param value Value to check for * @return either 'Q' or 'B'
src/mime-node/index.ts:1737
↓ 5 callers
Method
_normalizeAddress
* Normalizes an email address * * @param address An array of address objects * @return address string
src/mime-node/index.ts:1624
↓ 5 callers
Method
_normalizeHeaderKey
* Normalizes a header key, uses Camel-Case form, except for uppercase MIME- * * @param key Key to be normalized * @return key in Camel-
src/mime-node/index.ts:1431
↓ 5 callers
Method
build
(callback?: MimeNodeBuildCallback)
src/mime-node/index.ts:667
↓ 5 callers
Function
cb
()
test/smtp-pool/smtp-pool-test.ts:195
↓ 5 callers
Method
connect
* Creates a connection to a SMTP server and sets up connection * listener
src/smtp-connection/index.ts:628
↓ 5 callers
Method
createChild
* Creates and appends a child node.Arguments provided are passed to MimeNode constructor * * @param [contentType] Optional content type
src/mime-node/index.ts:433
↓ 5 callers
Method
getHeader
* Retrieves the first mathcing value of a selected key * * @param key Key to search for * @retun Value for the key
src/mime-node/index.ts:628
↓ 5 callers
Method
quit
* Sends QUIT
src/smtp-connection/index.ts:860
↓ 5 callers
Method
reject
Fails the authentication with an error
src/smtp-connection/index.ts:149
↓ 5 callers
Method
sendCommand
Sends a command to the server. Returns a promise when no callback is given
src/smtp-connection/index.ts:145
↓ 5 callers
Method
sign
(input: Readable | Buffer | string, extraOptions?: DKIMOptions)
src/dkim/index.ts:263
↓ 5 callers
Method
stop
()
test/smtp-transport/smtp-fixtures.ts:202
↓ 5 callers
Method
warn
(data?: LogEntry, message?: string, ...args: any[])
src/shared/index.ts:137
↓ 4 callers
Method
_createContentNode
* Creates a regular node with contents * * @param parentNode Parent for this note. If it does not exist, a root node is created * @para
src/mail-composer/index.ts:665
↓ 4 callers
Method
_destroy
* Destroys the client, emits 'end'
src/smtp-connection/index.ts:1413
↓ 4 callers
Method
_hashCanonical
(data: Buffer)
src/dkim/relaxed-body.ts:64
↓ 4 callers
Method
_isDestroyedMessage
* * @param command * @private
src/smtp-connection/index.ts:2384
↓ 4 callers
Method
addHeader
* Adds a header value. If the value for selected key exists, the value is appended * as a new field and old one is not touched. * You can se
src/mime-node/index.ts:589
↓ 4 callers
Function
addressparser
(str?: string | null, options?: AddressParserOptions)
src/addressparser/index.ts:544
↓ 4 callers
Method
callback
(...args: Parameters<SMTPConnectionSendCallback>)
src/smtp-connection/index.ts:1117
↓ 4 callers
Function
copyOwnKeys
(target: T, source: object | null | undefined, skip?: (key: string) => boolean)
src/shared/objects.ts:32
↓ 4 callers
Method
createReadStream
()
test/sendmail/sendmail-test.ts:34
↓ 4 callers
Method
resolveContent
( data: { [key: string]: any }, key: string | number, options?: ResolveContentOptions
src/mailer/mail-message.ts:151
↓ 4 callers
Function
sendMessage
(callback: () => void)
test/smtp-pool/smtp-pool-test.ts:174
↓ 3 callers
Method
_actionAUTHComplete
* Handles the response for authentication, if there's no error, * the user can be considered logged in. Start waiting for a message to send
src/smtp-connection/index.ts:2157
↓ 3 callers
Method
_createRelated
* Builds multipart/related node. It should always contain html node with related attachments * * @param parentNode Parent for this note. If
src/mail-composer/index.ts:633
↓ 3 callers
Method
_encodeHeaderValue
* Encodes a header value for use in the generated rfc2822 email. * * @param key Header key * @param value Header value
src/mime-node/index.ts:1483
↓ 3 callers
Method
_getIcalEvent
* Returns the icalEvent value with `path`/`href`/data uri input normalized into * a `content` entry, the same way as for regular attachments. The
src/mail-composer/index.ts:371
↓ 3 callers
Method
_getStream
* Detects and returns handle to a stream related with the content. * * @param content Node content * @returns Stream object
src/mime-node/index.ts:1274
↓ 3 callers
Method
_onConnect
* Connection listener that is run when the connection to * the server is opened * * @event
src/smtp-connection/index.ts:1193
↓ 3 callers
Method
_onConnectionError
* Handles connection errors with fallback to alternative addresses * * @param err Error object or message * @param code Error code
src/smtp-connection/index.ts:812
↓ 3 callers
Method
_processDataUrl
* Parses data uri and converts it to a Buffer * * @param element Content element * @return Parsed element
src/mail-composer/index.ts:736
↓ 3 callers
Method
_processMessages
* Check the queue and available connections. If there is a message to be sent and there is * an available connection, then use this connection to
src/smtp-pool/index.ts:290
↓ 3 callers
Method
cleanup
()
src/dkim/index.ts:112
↓ 3 callers
Function
finishRawServer
(server: RawServer, done: (err?: unknown) => void, assertions?: () => void)
test/smtp-connection/raw-smtp-server.ts:141
↓ 3 callers
Method
getAuth
(authOpts?: SMTPTransportAuthOptions | false | null)
src/smtp-transport/index.ts:178
↓ 3 callers
Method
getPath
* Returns normalized cookie path for an URL path argument * * @param pathname * @returns Normalized path
src/fetch/cookies.ts:281
↓ 3 callers
Method
getToken
* Returns or generates (if previous has expired) a XOAuth2 token * * @param renew If false then use cached access token (if available)
src/xoauth2/index.ts:180
↓ 3 callers
Method
isExpired
* Checks if a cookie is expired * * @param cookie Cookie object to check against * @returns True, if the cookie is expired
src/fetch/cookies.ts:271
↓ 3 callers
Method
isIdle
Tells whether the transport can take a message right away
src/mailer/index.ts:162
↓ 3 callers
Function
resolveNext
()
test/shared/shared-test.ts:877
↓ 3 callers
Function
send
(data: SendMailOptions)
test/nodemailer/list-headers-test.ts:9
↓ 3 callers
Method
setContent
* Sets body content for current node. If the value is a string, charset is added automatically * to Content-Type (if it is text/*). If the value
src/mime-node/index.ts:645
↓ 3 callers
Method
setRaw
* Sets pregenerated content that will be used as the output of this node * * @param raw Raw MIME contents
src/mime-node/index.ts:1229
↓ 3 callers
Function
startRawServer
(script: RawServerScript, callback: (server: RawServer) => void)
test/smtp-connection/raw-smtp-server.ts:58
↓ 3 callers
Function
wellKnown
(key: string)
src/well-known/index.ts:72
↓ 2 callers
Method
_connectToHost
* Attempts to connect to the specified host address * * @param opts Connection options * @param secure Whether to use TLS
src/smtp-connection/index.ts:764
↓ 2 callers
Method
_createAlternative
* Builds multipart/alternative node. It should always contain same type of elements on the same level * eg. text + html view of the same data
src/mail-composer/index.ts:598
↓ 2 callers
Method
_encodeWords
* If needed, mime encodes the name part * * @param name Name part of an address * @returns Mime word encoded string if needed
src/mime-node/index.ts:1724
↓ 2 callers
Method
_formatListUrl
(url: string)
src/mailer/mail-message.ts:446
↓ 2 callers
Method
_generateBoundary
* Generates a multipart boundary value * * @return boundary value
src/mime-node/index.ts:1473
↓ 2 callers
Method
_generateMessageId
* Generates a message id * * @return Random Message-ID value
src/mime-node/index.ts:1766
↓ 2 callers
Method
_getDsnRcptToArgs
()
src/smtp-connection/index.ts:1754
↓ 2 callers
Method
_getListHeaders
(listData: MailComposerListHeaders)
src/mailer/mail-message.ts:393
↓ 2 callers
Method
_handleContentType
* Checks if the content type is multipart and defines boundary if needed. * Doesn't return anything, modifies object argument instead. *
src/mime-node/index.ts:1455
↓ 2 callers
Method
_handleXOauth2Token
(isRetry: boolean, callback: SMTPConnectionCallback)
src/smtp-connection/index.ts:2353
↓ 2 callers
Method
_onData
* 'data' listener for data coming from the server * * @event * @param chunk Data chunk coming from the server
src/smtp-connection/index.ts:1257
↓ 2 callers
Method
_processPlugins
(step: string, mail: MailMessage<T>, callback: PluginCallback)
src/mailer/index.ts:492
↓ 2 callers
Method
_processResponse
* Processes queued responses from the server
src/smtp-connection/index.ts:1509
↓ 2 callers
Method
_setEnvelope
* Initiates a new message by submitting envelope data, starting with * MAIL FROM: command * * @param envelope Envelope object in the fo
src/smtp-connection/index.ts:1590
↓ 2 callers
Method
_setupConnectionHandlers
* Sets up connection timeout and error handlers
src/smtp-connection/index.ts:798
↓ 2 callers
Method
_upgradeConnection
* Upgrades the connection to TLS * * @param callback Callback function to run when the connection * has been secured
src/smtp-connection/index.ts:1435
↓ 2 callers
Function
adapt
(delta: number, numPoints: number, firstTime: boolean)
src/punycode/index.ts:206
next →
1–100 of 546, ranked by callers