Page 1 of 1

how to know if emailIt() has worked?

Posted: Mon Aug 22, 2011 2:53 am
by FBC-Tim
I am using an Extra Action Button to email a report directly by calling emailIt(). I need to save a note record to my database when this email has been sent, as a record of what the user has done.
If the user presses 'cancel' in the email dialog box, or if nuBuilder detects an email error I would like to skip creation of the note record.
I have tried the code below:

Code: Select all

  var scSuccess = emailIt('RPT-ServicePlan', scTo, scFrom, scSubject, scMessage, scFileName, false, 'PDF');

  if (scSuccess) {
    nuDebug('yyyyyyyyyyyyyyyyyyyyyyyyyyy');
  }
  else {
    nuDebug('nnnnnnnnnnnnnnnnnnnnnnnnnnn');
  }
But this code shows the 'nnnnnn' debug even before the user has pressed SEND. Javascript does not wait for emailIt() to complete.
If I understand correctly to only way to make JavaScript do this is for emailIt() to include a callback function? Is that right?

How is it possible to take action if the email was processed correctly? What do you suggest I do here?

Re: how to know if emailIt() has worked?

Posted: Tue Jan 17, 2012 7:45 am
by admin
sotaabuts,

What are you talking about?
I don't understand what you are trying to say.
please read my entire post. .
What post?

Steven

Re: how to know if emailIt() has worked?

Posted: Fri May 04, 2012 10:39 am
by zazzium
I have the same problem.
..has anyone found a solution to this?

Re: how to know if emailIt() has worked?

Posted: Mon May 07, 2012 4:25 am
by admin
zazzium,

nuBuilder isn't the email program.

PHP sends it to whatever mail server you have on your server.

It can't guarantee what the email server does with it.

Maybe bcc a copy of the email to yourself.

Steven

Re: how to know if emailIt() has worked?

Posted: Mon May 07, 2012 9:17 pm
by zazzium
nuBuilder isn't the email program
fair enough

guess u have to modify reportemail.php or reportpdfemail.php to get a mark to database
that pdf invoice is successfully sent by email.

Re: how to know if emailIt() has worked?

Posted: Thu May 10, 2012 11:56 pm
by admin
.