})
// Send a message to the user
await context.sendActivity(Oops. Something went wrong!);
// Clear out state
await conversationState.delete(context);
};
Issue :
Whenever there is an bot error, sendemail method consider it as email error and do not send email and executes If(emailerr) block of sendMail callback function
I want send email in Bot framework as a "error notification". So sending email to myself whenever there is an error in bot application.
Below is the code: adapter.onTurnError = async (context, boterror) => { // This check writes out errors to console log
host: 'smtp.gmail.com', port: 465, secure: true, auth: { user:'*****@gmail.com', pass: PASSWORD } });
}) // Send a message to the user await context.sendActivity(
Oops. Something went wrong!
); // Clear out state await conversationState.delete(context); };Issue : Whenever there is an bot error, sendemail method consider it as email error and do not send email and executes If(emailerr) block of sendMail callback function