FORUMS


The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Email Notification: Not Receiving
#1
Hi,
I have version 2.2.2 installed. Everything works perfectly except im not receiving the email notifications for the submissions. Email template is setup and "Send Test Email" sends out successfully. Any ideas on how to fix?

Thanks































































Reply
#2
I am having the same issue.

I am using the API to submit my form with version 2.2.2. I can send test emails without issue and also send the emails from the FormTools edit submission page, but they aren't sent on submission. Any help would be appreciated.

Thanks!
Reply
#3
Bump.

I have tried the following fix from over a year ago (http://forums.formtools.org/showthread.php?tid=652) as I noticed my api.php did not have the hack in place, but that didn't fix the issue.

I have also added "send_emails" => true to my params on the final page even though I already have finalize set, but emails still aren't being sent.

As I mentioned before, test emails can be sent, but I need this to work on submission as a confirmation email is being sent out. I am using the Stripe payment gateway API at the same time, so that could possibly be the issue, but I doubt it as payments are being made, and form submissions are being added the the Form Tools database.

If anyone has any ideas, I'd appreciate it.

Thanks
The issue has been fixed. I should learn to follow directions better. Tongue

I decided to add in the next_page param and the email was sent. Unfortunately, with the way I'm using the Stripe API, I need it to stay on the same page so I can submit the payment and also display the previous values using the $_POST results so the visitor can print for their records (just in case the email gets blocked).

Seeing that that worked, I revisited the api.php file and noticed that hile I added in the if statement at the bottom of the function, I failed to remove the check for the next_page param farther up. I removed that and now everything works perfectly!
Reply
#4
I am having the same issue but using a direct form submission not API. The test email will send fine but notifications are not sent when submitted. Any thoughts? Thanks a ton!
Reply
#5
For those who have asked exactly what I did, here's the answer. Using 2.2.2 and the API, my issue was that I had the page set up to stay on the current page rather than setting a next_page variable.

It appears that the form will still submit, but if no next_page variable is set, no emails will be sent. The fix is to either set to variable, or apply the following fix to the core (just make sure you remember what it is when you have to upgrade).

FORM_TOOLS_DIRECTORY/global/api/api.php: LINE 866

Before:
PHP Code:
if ($passes_captcha && !empty($next_page) && !$is_deleting_file)
  {
    
// if the user wasn't putting through a test submission or initializing the form, we can send safely
    // send emails at this juncture, but ONLY if it was just finalized
    
if ($form_id != "test" && $submission_id != "test" && !isset($_SESSION[$namespace]["form_tools_initialize_form"])
      && !isset(
$form_data["form_tools_ignore_submission"]))
    {
      
// send any emails attached to the on_submission trigger
      
if ($is_finalized == "yes")
        
ft_send_emails("on_submission"$form_id$submission_id);
    }

    
header("location: $next_page");
    exit;
  }

  return array(
true""); 

After:
PHP Code:
if ($passes_captcha && !$is_deleting_file)
  {
    
// if the user wasn't putting through a test submission or initializing the form, we can send safely
    // send emails at this juncture, but ONLY if it was just finalized OR if the send_emails parameter
    // allows for it
    
if ($form_id != "test" && $submission_id != "test" && !isset($_SESSION[$namespace]["form_tools_initialize_form"])
      && !isset(
$form_data["form_tools_ignore_submission"]))
    {
      
// send any emails attached to the on_submission trigger
      
if (isset($params["send_emails"]) && $params["send_emails"] === true)
        
ft_send_emails("on_submission"$form_id$submission_id);
      else if (
$is_finalized == "yes" && (!isset($params["send_emails"]) || $params["send_emails"] !== false))
        
ft_send_emails("on_submission"$form_id$submission_id);
    }

    if(!empty(
$next_page))
     {
        
header("location: $next_page");
        exit;
    }
  }

  return array(
true""); 

The fix makes it so the form will send emails, even if there is no next_page variable set by modifying the if statements.

A special thanks to this post earlier for helping me troubleshoot this: http://forums.formtools.org/showthread.php?tid=652

I hope this helps any one else who's having the issue.
Reply
#6
Thank you!

(Apr 4th, 2012, 4:13 AM)sethta Wrote: For those who have asked exactly what I did, here's the answer. Using 2.2.2 and the API, my issue was that I had the page set up to stay on the current page rather than setting a next_page variable.

It appears that the form will still submit, but if no next_page variable is set, no emails will be sent. The fix is to either set to variable, or apply the following fix to the core (just make sure you remember what it is when you have to upgrade).

FORM_TOOLS_DIRECTORY/global/api/api.php: LINE 866

Before:
PHP Code:
if ($passes_captcha && !empty($next_page) && !$is_deleting_file)
  {
    
// if the user wasn't putting through a test submission or initializing the form, we can send safely
    // send emails at this juncture, but ONLY if it was just finalized
    
if ($form_id != "test" && $submission_id != "test" && !isset($_SESSION[$namespace]["form_tools_initialize_form"])
      && !isset(
$form_data["form_tools_ignore_submission"]))
    {
      
// send any emails attached to the on_submission trigger
      
if ($is_finalized == "yes")
        
ft_send_emails("on_submission"$form_id$submission_id);
    }

    
header("location: $next_page");
    exit;
  }

  return array(
true""); 

After:
PHP Code:
if ($passes_captcha && !$is_deleting_file)
  {
    
// if the user wasn't putting through a test submission or initializing the form, we can send safely
    // send emails at this juncture, but ONLY if it was just finalized OR if the send_emails parameter
    // allows for it
    
if ($form_id != "test" && $submission_id != "test" && !isset($_SESSION[$namespace]["form_tools_initialize_form"])
      && !isset(
$form_data["form_tools_ignore_submission"]))
    {
      
// send any emails attached to the on_submission trigger
      
if (isset($params["send_emails"]) && $params["send_emails"] === true)
        
ft_send_emails("on_submission"$form_id$submission_id);
      else if (
$is_finalized == "yes" && (!isset($params["send_emails"]) || $params["send_emails"] !== false))
        
ft_send_emails("on_submission"$form_id$submission_id);
    }

    if(!empty(
$next_page))
     {
        
header("location: $next_page");
        exit;
    }
  }

  return array(
true""); 

The fix makes it so the form will send emails, even if there is no next_page variable set by modifying the if statements.

A special thanks to this post earlier for helping me troubleshoot this: http://forums.formtools.org/showthread.php?tid=652

I hope this helps any one else who's having the issue.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)