@@ -209,6 +209,10 @@ export interface SMTPServerOptions extends tls.TlsOptions {
209209 * Enhanced status codes are disabled by default.
210210 */
211211 hideENHANCEDSTATUSCODES ?: boolean | undefined ;
212+ /**
213+ * optional boolean, if set to true then does not show DSN in features list, by default DSN is disabled
214+ */
215+ hideDSN ?: boolean ;
212216 /**
213217 * optional boolean, if set to true allows authentication even if connection is not secured first
214218 */
@@ -295,7 +299,11 @@ export interface SMTPServerOptions extends tls.TlsOptions {
295299 /**
296300 * the callback to handle incoming messages ([see details](https://nodemailer.com/extras/smtp-server#processing-incoming-messages-ondata))
297301 */
298- onData ?( stream : SMTPServerDataStream , session : SMTPServerSession , callback : ( err ?: Error | null ) => void ) : void ;
302+ onData ?(
303+ stream : SMTPServerDataStream ,
304+ session : SMTPServerSession ,
305+ callback : ( err ?: Error | null , message ?: string ) => void ,
306+ ) : void ;
299307 /**
300308 * the callback that informs about closed client connection
301309 */
@@ -339,7 +347,11 @@ export class SMTPServer extends EventEmitter {
339347 /** Override this */
340348 onConnect ( session : SMTPServerSession , callback : ( err ?: Error | null ) => void ) : void ;
341349 /** Override this */
342- onData ( stream : SMTPServerDataStream , session : SMTPServerSession , callback : ( err ?: Error | null ) => void ) : void ;
350+ onData (
351+ stream : SMTPServerDataStream ,
352+ session : SMTPServerSession ,
353+ callback : ( err ?: Error | null , message ?: string ) => void ,
354+ ) : void ;
343355 /** Override this */
344356 onMailFrom ( address : SMTPServerAddress , session : SMTPServerSession , callback : ( err ?: Error | null ) => void ) : void ;
345357 /** Override this */
0 commit comments