Reply To: Populate email in url

Home Forums Quform WordPress Populate email in url Reply To: Populate email in url

#34470
klurth
Participant

Hey Ally,

thanks. This is the code I used in the functions.php:


add_action('quform_pre_send_notification_53_7', function ($mailer, Quform_Notification $notification, Quform_Form $form) {
ob_start();
include __DIR__ . '/email-content.php';
$mailer->Body = ob_get_clean();
}, 10, 3);

53_7 is the unique identifier of the notification.

And this is the code within the email-conten.php:


<?php
$url = 'https://spieren.de/24-stunden-services/rezept-bestellen/';

$url = add_query_arg(array(
'vn' => urlencode($form->getValue('quform_53_3')),
'nn' => urlencode($form->getValue('quform_53_10')),
'gd' => urlencode($form->getValue('quform_53_11')),
'em' => urlencode($form->getValue('quform_53_4')),
'tf' => urlencode($form->getValue('quform_53_13')),
'vs' => urlencode($form->getValue('quform_53_312')),
'kk' => urlencode($form->getValue('quform_53_308')),
'mm1' => urlencode($form->getValue('quform_53_213')),
'ws1' => urlencode($form->getValue('quform_53_215')),
'df1' => urlencode($form->getValue('quform_53_216')),
'pg1' => urlencode($form->getValue('quform_53_223')),
'mg1' => urlencode($form->getValue('quform_53_268')),
'mt1' => urlencode($form->getValue('quform_53_273')),
'ab1' => urlencode($form->getValue('quform_53_274')),
'zn1' => urlencode($form->getValue('quform_53_275')),
'am1' => urlencode($form->getValue('quform_53_277')),
), $url);
<h2>Übermittelte Daten</h2>
<div style="font-family: Arial; margin: 0px!important; padding: 0px!important;">

Hallo {element|id:3|Vorname} {element|id:10|Nachname},

wir haben folgende Rezeptbestellung von Ihnen erhalten:

Neue Bestellung - hier klicken

</div>
<div style="font-family: Arial; margin: 0px!important; padding: 0px!important;">

">Erneut bestellen

Viele Grüße,

Ihr Team der Arztpraxis Spieren


Im Buchwald 1 | 57482 Wenden
Telefon: 0 27 62 / 97 57 - 0
Telefax: 0 27 62 / 97 57 - 57
eMail: <span style="color: #0066cc;">www.spieren.de/kontakt</span>
Homepage: <span style="color: #0066cc;">http://www.spieren.de</span>

Lehrarztpraxis der Universitäten Düsseldorf, Göttingen, Köln und Witten/Herdecke
ÄKWL-Weiterbildungsstätte zum Facharzt für Allgemeinmedizin
Gesundheitsförderung & Prävention, hausärztliche Geriatrie und Psychosomatik, Notfallmedizin, Verkehrsmedizin

BSNR 18 84 711 00

Facebook: facebook.com/ArztpraxisSpieren
Instagram: instagram.com/arztpraxisspieren

</div>
?>

Thank a lot for your help!

Best regards,
Thomas

Be inspired. © 2020 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy