Home › Forums › Quform WordPress › Send Multi Emails
- This topic has 6 replies, 2 voices, and was last updated 6 years, 11 months ago by Ally.
- AuthorPosts
- July 4, 2016 at 2:45 pm #19476moeParticipant
Hi,
We discuss earlier about sending multi emails from multi fields, you can see the discuss below:
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,
MoeJuly 6, 2016 at 6:49 pm #19495AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
April 20, 2017 at 1:18 pm #21150moeParticipantHi 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 />
<?phpif ($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 />
The problem is they don’t receive an email
Can you please help us in that and check what is the problem.Kind Regards
MoeAttachments:
You must be logged in to view attached files.April 24, 2017 at 7:11 am #21160moeParticipantHi 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
April 25, 2017 at 9:44 pm #21165AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
April 26, 2017 at 7:28 am #21169moeParticipantHi 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,
MoeAttachments:
You must be logged in to view attached files.April 30, 2017 at 6:29 pm #21179AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- AuthorPosts
- You must be logged in to reply to this topic.