This forum is no longer open and is for reading/searching only.
Please use our new MachForm Community Forum instead.
MachForm Community Forums » MachForm 2
Make notification email optional for my users
Started 14 years ago by drumaboy46 | 11 posts |
-
I was wondering if I could add a check box that says "I would like a receipt" to my form so that a copy of the filled out form goes to the user only when they choose to get a notification. I know I can have this done automatically everytime but I'd rather give my users this option. Thanks in advance. I love this app its a great tool the way that things can be modified.
Could I also rather than a check box make the sending of a receipt based on my users email like.
<? if ( $myUsersEmail == "abc123@mydomian.com" ) { //Do this: Send notification email } else { //Do Nothing and just send form normally } ?>
if this is possible where in the code would I go to implement my idea would it be in post-functions.php around line 1122? Thanks in advance.
Posted 14 years ago # -
Yes, you can do it based on your user email address.
Around line 1208 of your "includes/post-functions.php" file, you'll find this code:
send_notification($form_id,$record_insert_id,$esr_email_address,$user_email_param);
you can adjust it to be something like this:
if($esr_email_address == 'abc123@mydomian.com'){ send_notification($form_id,$record_insert_id,$esr_email_address,$user_email_param); }
simply adjust the if condition further to suit your need.
MachForm Founder
Posted 14 years ago # -
ok thanks that got me closer. But I want to automatically send a certain message to those whose email are yahoo. Because were having issues with undelivered emails. So if a user sends info to a a yahoo email he will be sent a notification email that explains whats going on with yahoo here is my code:
$string = $_POST['element_11']; //POST THE PROSPECTS EMAIL $newstring =strstr ($string, "@"); //RETURN ALL DATA AFTER THE "@" SYMBOL if($newstring == "@yahoo.com") { send_notification($form_id,$record_insert_id,$esr_email_address,$user_email_param); } else { //Don't send any notification }
As you can see element_11 is that of the prospects email. So on my follow-up form in the To: email I want the code to send a notification email to the From: Email (my user) IF the email in the To Email: is a yahoo email.
But for some reason after I put the code it sill sends email regardless of what email is there. Please help I'm so close.
And if I can't do that I just want to put a check box on the form the gives the user a choice whether or not they want the notification to be sent or not. Just let me know thanks again.
Posted 14 years ago # -
You can try to change the code to be like this :
if (!empty($table_data['element_11']) && $form_id == 5) { if (eregi('@yahoo.com',$table_data['element_11'])) { send_notification($form_id,$record_insert_id,$form_email,$admin_email_param); } }
that would make the mail filtered to "yahoo" mail address only
MachForm Support
Posted 14 years ago # -
im still getting the notification regardless of what kind of email I it is. And yes I have the right form_id. I only want a notification sent if my user's prospects email is ...@yahoo.com. So the prospect's email is an element_11 on the form itself not the email in the email panel of the admin page.
ex:
Follow-Up FormUser From Name: xyz
User From Email: xyz@gmail.comProspect To Name: xyz
Prospect To Email: xyz@yahoo.com (send notification to xyz@gmail.com if prospect from email is ...@yahoo.com)I'm editing around line 1173 and the code way above it around line 1122 looks like this:
//start sending notification email to user ------------------------------------------ if($is_inserted && !empty($esr_email_address) && empty($form_review)){ //get parameters for the email
what am I doing wrong is there anything I have to do on the "email" option in the admin panel?
Posted 14 years ago # -
dont forget about me Yunair or redityo :}
Posted 14 years ago # -
Sorry for the delay, I think I need to check your "post-functions.php" file directly. Could you send me that file to :
customer.service[at]appnitro.com
MachForm Support
Posted 14 years ago # -
just wanted to close the session I no longer have to do that I have resolved my issues with yahoo. For some reason I was being blacklisted by a spam list. For those of you experiencing this problem it has NOTHING to do with Machforms. And everything to do with your HOST make sure you have SPF Records and Domain Keys Enable via your cPanel.
Thank you for responding not worry on the delay redityo. :)
Posted 14 years ago # -
ok I lied I still need help I will send you the file.
Posted 14 years ago # -
redityo let me know when you received the info?
Posted 14 years ago # -
I've got your mail and the file. Also, I've reply it. Let's continue there.
MachForm Support
Posted 14 years ago #
Reply
You must log in to post.