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.


  1. MvdL79
    Member

    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,
    Michel

    Posted 11 years ago #
  2. yuniar

    It is possible to do so. What version currently do you use?


    MachForm Founder

    Posted 11 years ago #
  3. MvdL79
    Member

    Thanks for the reply.

    We are still using: MachForm Version 3.2

    Posted 11 years ago #
  4. MvdL79
    Member

    * bump *

    Posted 11 years ago #
  5. conceive
    Member

    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 #
  6. MvdL79
    Member

    I know because I have been a customer since early 2008 of Machform.
    Anyways * bump * as a reminder.

    Posted 11 years ago #
  7. yuniar

    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 #
  8. MvdL79
    Member

    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 #
  9. yuniar

    Sorry, just a typo :-) You're so quick!


    MachForm Founder

    Posted 11 years ago #
  10. MvdL79
    Member

    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 #
  11. yuniar

    Yes! :-)


    MachForm Founder

    Posted 11 years ago #
  12. MvdL79
    Member

    Okay, thanks Yuniar. Just making sure. :)
    Thank you once again for your help!

    Posted 11 years ago #
  13. MvdL79
    Member

    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 #
  14. MvdL79
    Member

    Nevermind figured it out myself.
    Just changed it into: ->setSubject('subject message here')

    Thanks!

    Posted 11 years ago #

RSS feed for this topic

Reply