mardi 21 avril 2020

InboxSDK presending event if condition gets stuck

I am using the presending event of InboxSDK to check for a condition before sending the email. For the case selectedProject!==0, email is not getting sent. Does anyone have any comments.

composeView.on('presending', (event) => {
  if(selectedProject!==0){
    //console.log(selectedProject);
    composeView.send();

  }else{
    console.log(selectedProject);
    event.cancel();
    console.log('please select a project for the email');
    alert('please select a project for the email');
    initDropdown();//show the dropdown to select projects
  }

Aucun commentaire:

Enregistrer un commentaire