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
First, stream.on("end") will called after Data Ended. But how to get into this event ? I mean, I could end it if I use Telnet, just type "." (dot) and stream.on("end") will fired. But I tried with SMTP (nodemailer.createTransport), the "end" event is not called, I could even console.log(parsed) mail with MailParser, and it's stuck until Timed Out, which will give the Transport Timeout Response.
This is my onData callback,
asynconData(stream,session,callback){stream.pipe(process.stdout);console.log('test123')letdata=awaitmailparser(stream);// console.log(data)console.log('end123')stream.on('end',async()=>{console.log('end')leterr;if(stream.sizeExceeded){err=newError('Error: message exceeds fixed maximum message size 10 MB');err.responseCode=552;returncallback(err);}callback(null,'Message queued as abcdef');// accept the message once the stream is ended});}
And the log looks like this,
[2021-11-29 06:49:25] DEBUG [#2olhr63d4yyjaq4o] C: DATA
test123
[2021-11-29 06:49:25] DEBUG [#2olhr63d4yyjaq4o] S: 354 End data with <CR><LF>.<CR><LF>
Message-ID: <[email protected]>
Date: Mon, 29 Nov 2021 13:49:24 +0700
Subject: Test Email . \n\n .
From: MyHealthcare <[email protected]>
To: [email protected]
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Hello World!
end123
[2021-11-29 06:50:25] INFO [#2olhr63d4yyjaq4o] Connection closed to [192.168.10.10]
Another information,
logger: true
secure: false,
banner: 'Welcome to My Mail Service - SMTP Server'
disabledCommands: ['STARTTLS']
authMethods: ['PLAIN', 'LOGIN']
size: 10 * 1024 * 1024
useXClient: true
hidePIPELINING: true
useXForward: true
SMTPServer.listen(587, 192.168.10.1)
Calling "stream.end()" doesn't call event "end" either. Or, should I just call callback(null, 'success')?
The text was updated successfully, but these errors were encountered:
First, stream.on("end") will called after Data Ended. But how to get into this event ? I mean, I could end it if I use Telnet, just type "." (dot) and stream.on("end") will fired. But I tried with SMTP (nodemailer.createTransport), the "end" event is not called, I could even console.log(parsed) mail with MailParser, and it's stuck until Timed Out, which will give the Transport Timeout Response.
This is my onData callback,
And the log looks like this,
Another information,
Calling "stream.end()" doesn't call event "end" either. Or, should I just call
callback(null, 'success')
?The text was updated successfully, but these errors were encountered: