This forum is no longer open and is for reading/searching only.
Please use our new MachForm Community Forum instead.
MachForm Community Forums » MachForm 3
Customers not always receiving our mailed forms.
Started 11 years ago by MvdL79 | 14 posts |
-
Hi Yuniar,
Unfortunately we still have customers who do not receive our mailed forms. Of course this is not really the problem of Machform, but more related to the contents of the mailed forms. Most of the time (not always) the mailed forms are seen or considered as spam and some (lazy) customers don't check their spambox.
Anyways, I was wondering if the following is possible. Other than the mailed form, I want Machform to also send a plain ascii mail out where it says some basic stuff, for example; "We have send you a welcome letter, but due to the contents its sometime considered as spam and therefor in goes into you spambox. Please check you spambox for the welcome email if you haven't received it yet."
I don't know if this is possible for some form ID's (not all)?
So after I fill in the form, it would send the normal mailed form, together with a very basic ascii mail telling the above text. This way the customer will always receive the simple mail and advice them to check their spambox as well.
Let me know when you have the time if this is possible.
Regards,
MichelPosted 11 years ago # -
It is possible to do so. What version currently do you use?
MachForm Founder
Posted 11 years ago # -
Thanks for the reply.
We are still using: MachForm Version 3.2
Posted 11 years ago # -
* bump *
Posted 11 years ago # -
That's a cool idea. Like to know myself... [fyi MvdL79- they're really good about answering posts daily but from a diff time zone, so can take a few hours - so no real need to bump]
:]
Posted 11 years ago # -
I know because I have been a customer since early 2008 of Machform.
Anyways * bump * as a reminder.Posted 11 years ago # -
Ok, if you are using v3.2, search around line 757 of your "includes/helper-functions.php" file:
$send_result = $s_mailer->send($s_message); if(empty($send_result)){ echo "Error sending email!"; }
right below that block, add this code:
if($form_id == 1928){ if($target_is_admin == false){ $email_content = "We have send you a welcome letter, but due to the contents its sometime considered as spam and therefor in goes into you spambox. Please check you spambox for the welcome email if you haven't received it yet."; $s_message = Swift_Message::newInstance() ->setCharset('utf-8') ->setMaxLineLength(1000) ->setSubject($subject) ->setFrom(array($from_email => $from_name)) ->setSender($from_email) ->setReturnPath($from_email) ->setTo($email_address) ->setBody($email_content, 'text/plain'); $s_mailer->send($s_message); } }
that should restrict the code to form with id number 1928 only.
MachForm Founder
Posted 11 years ago # -
Thanks, but we are using and I quote "We are still using: MachForm Version 3.2"
Not 3.3! :(Or will this code also work for 3.2?
Posted 11 years ago # -
Sorry, just a typo :-) You're so quick!
MachForm Founder
Posted 11 years ago # -
Haha... I was working on the form and that's why I was keeping an eye on the forum. ;)
Correct me if I am wrong, but I need to replace "if($form_id == 1928){"
With the corresponding form ID right?
Posted 11 years ago # -
Yes! :-)
MachForm Founder
Posted 11 years ago # -
Okay, thanks Yuniar. Just making sure. :)
Thank you once again for your help!Posted 11 years ago # -
Hi Yuniar!
I added the code today and tested it and it's working great, however I need to make one small change and I need your advice for this.
Currently it sends out the email with the same subject name as the real emailed form. I want to change the subject of this simple email to something else.
After looking at the code I guess I will have to change this line:
->setSubject($subject)
How do I change that into something like "Extra important information in regards to your order."
Thank you in advance!
Posted 11 years ago # -
Nevermind figured it out myself.
Just changed it into: ->setSubject('subject message here')Thanks!
Posted 11 years ago #
Reply
You must log in to post.