Send Multi Emails

Home Forums Quform WordPress Send Multi Emails

This topic is: not resolved

This topic contains 6 replies, has 2 voices, and was last updated by  Ally 1 month, 3 weeks ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #19476

    moe
    Participant

    Hi,

    We discuss earlier about sending multi emails from multi fields, you can see the discuss below:

    http://codecanyon.net/item/quform-wordpress-form-builder/706149/comments?page=212&filter=all#comment_13577165

    what i did is you can see in attachment.

    It’s actually worked as if all fields not empty so send all fields to all emails, i attached how it’s look like.

    But what i want :
    If (field 1 or 2 or 3) not empty so send to (email 1)
    If (field 4 or 5 or 6) not empty so send to (email 2)

    I don’t want to send all the data to all emails, only the data that belong to the email.

    Awaiting for your kind response. 🙂

    kind regards,
    Moe

    #19495

    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #21150

    moe
    Participant

    Hi Ally

    As the earlier discussion we have just finished our website but unfornatlly there’s still problem and our companies can’t receive emails.

    The main code in function.php

    function my_pre_send_notification_email_1($mailer, $form, $attachments)
    {

    if (!$form->getElement('iphorm_11_64')->isEmpty()){

    if (!$form->getElement('iphorm_11_11')->isEmpty() or !$form->getElement('iphorm_11_12')->isEmpty() or !$form->getElement('iphorm_11_13')->isEmpty() or !$form->getElement('iphorm_11_14')->isEmpty() or !$form->getElement('iphorm_11_15')->isEmpty() or !$form->getElement('iphorm_11_16')->isEmpty() or !$form->getElement('iphorm_11_17')->isEmpty() or !$form->getElement('iphorm_11_18')->isEmpty() or !$form->getElement('iphorm_11_19')->isEmpty() or !$form->getElement('iphorm_11_20')->isEmpty() or !$form->getElement('iphorm_11_21')->isEmpty() or !$form->getElement('iphorm_11_22')->isEmpty() or !$form->getElement('iphorm_11_23')->isEmpty() or !$form->getElement('iphorm_11_30')->isEmpty() or !$form->getElement('iphorm_11_40')->isEmpty()) {
    $mailer2 = iphorm_new_phpmailer($form);
    $mailer2->addAddress('bestilling@norager-vognmand.dk','btjkyh@gmail.com');

    ob_start();
    include dirname(__FILE__) . '/form-email-miljo.php';
    $mailer2->msgHTML(ob_get_clean());
    $mailer2->send();
    }

    if (!$form->getElement('iphorm_11_44')->isEmpty() or !$form->getElement('iphorm_11_46')->isEmpty()) {
    $mailer2 = iphorm_new_phpmailer($form);
    $mailer2->addAddress('logistikdk@genan.eu');

    ob_start();
    include dirname(__FILE__) . '/form-email-genan.php';
    $mailer2->msgHTML(ob_get_clean());
    $mailer2->send();
    }

    if (!$form->getElement('iphorm_11_50')->isEmpty() or !$form->getElement('iphorm_11_52')->isEmpty()) {
    $mailer2 = iphorm_new_phpmailer($form);
    $mailer2->addAddress('jenskglerup@fibermail.dk');

    ob_start();
    include dirname(__FILE__) . '/form-email-glerup.php';
    $mailer2->msgHTML(ob_get_clean());
    $mailer2->send();
    }

    if (!$form->getElement('iphorm_11_56')->isEmpty() or !$form->getElement('iphorm_11_57')->isEmpty() or !$form->getElement('iphorm_11_60')->isEmpty()) {
    $mailer2 = iphorm_new_phpmailer($form);
    $mailer2->addAddress('info@mfc.dk');
    $mailer2->AddBCC('4an@viborg.dk','ji@viborg.dk');

    ob_start();
    include dirname(__FILE__) . '/form-email-mfc.php';
    $mailer2->msgHTML(ob_get_clean());
    $mailer2->send();
    }

    if (!$form->getElement('iphorm_11_62')->isEmpty() or !$form->getElement('iphorm_11_63')->isEmpty()) {
    $mailer2 = iphorm_new_phpmailer($form);
    $mailer2->addAddress('dk.bestilling@stenarecycling.com');
    $mailer2->AddBCC('4an@viborg.dk','ji@viborg.dk');

    ob_start();
    include dirname(__FILE__) . '/form-email-stena.php';
    $mailer2->msgHTML(ob_get_clean());
    $mailer2->send();
    }}
    else{

    $mailer->AddAddress('vejebod@viborg.dk'); }

    return $mailer;
    }
    add_action('iphorm_pre_send_notification_email_11', 'my_pre_send_notification_email_1', 10, 3);

    Here you get an example also for one of those php pages (form-email-genan.php)


    <h2>Mail til PLADSMAND / BESTILLER</h2>
    Bestilling af LØBENDE TØMNING af container på: <b><?php echo $form->getValueHtml('iphorm_11_3'); ?></b><br /><br />
    <?php

    if ($form->getValueHtml('iphorm_11_3') == "Karup genbrugsstation"){
    echo "Karup genbrugsstation, Materielvej 3, 7470 Karup, tlf. +45 20 77 03 71</br> Mandag-torsdag kl. 15 – 18 Fredag 13 – 18 Lørdag 10 – 18";
    }
    elseif ($form->getValueHtml('iphorm_11_3') == "Møldrup genbrugsstation"){
    echo "Møldrup genbrugsstation, Erhvervsparken 6, 9632 Møldrup, tlf. +45 20 77 04 56</br> Mandag – torsdag 15 – 18 Fredag 13 – 18 Lørdag 10 – 18";
    }
    elseif ($form->getValueHtml('iphorm_11_3') == "Bjerringbro genbrugsstation"){
    echo "Bjerringbro genbrugsstation, Engvejen 2A, 8850 Bjerringbro, tlf. +45 20 77 11 94</br> Mandag – fredag 13 – 18
    Lørdag 10 – 18";
    }
    elseif ($form->getValueHtml('iphorm_11_3') == "Stoholm genbrugsstation"){
    echo "Stoholm genbrugsstation, Tastumvej 18D, 7850 Stoholm, tlf. +45 20 77 15 61</br> Mandag – torsdag 15 – 18 Fredag 13 – 18 Lørdag 10 – 18";
    }
    elseif ($form->getValueHtml('iphorm_11_3') == "Viborg genbrugsstation"){
    echo "Viborg genbrugsstation, Kirkebækvej 136, 8800 Viborg, tlf. +45 20 51 46 95</br> Mandag – fredag 8 – 18 Lørdag og søndag 10 – 18";
    }
    elseif ($form->getValueHtml('iphorm_11_3') == "Ørum genbrugsstation"){
    echo "Ørum genbrugsstation, Industrivej 18 Ørum, 8830 Tjele, tlf. +45 20 77 23 62</br> Mandag – torsdag 15 – 18 Fredag 13 – 18 Lørdag 10 – 18";
    }
    ?><br /><br />
    <b>Pladsmand:</b> <?php echo $form->getValueHtml('iphorm_11_4'); ?><br />
    <b>E-mail:</b> <?php echo $form->getValueHtml('iphorm_11_5'); ?><br /><br />
    <p>------------</p>
    <b>Dæk:</b> <?php echo $form->getValueHtml('iphorm_11_44'); ?><br />
    <b>Evt. bemærkninger til Genan:</b> <?php echo $form->getValueHtml('iphorm_11_46'); ?><br />

    Form link

    The problem is they don’t receive an email
    Can you please help us in that and check what is the problem.

    Kind Regards
    Moe

    Attachments:
    You must be logged in to view attached files.
    #21160

    moe
    Participant

    Hi Ally

    I just want to make sure that you received that above and it’s clear.
    Please let me know if you need any more info to know.

    Awaiting for your kind response.

    Moe

    #21165

    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #21169

    moe
    Participant

    Hi Ally

    It’s didn’t work at all. I tried both emails in lines and 2 SMPT solutions SparkPost and Mailjet.

    Can you please do that for us, we will pay for it or if you have other solution.
    This forms it’s for Government and should be work in any solution as we decided to use Quform to do especially that (Multi emails)

    Awaiting for your kind response and will really appreciate your help.

    Kind Regards,
    Moe

    Attachments:
    You must be logged in to view attached files.
    #21179

    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.