Code:
global $mosConfig_mailfrom, $mosConfig_fromname, $my;
$this->execPieceByName('ff_InitLib');
// Send profile to Client
$from = ff_getSubmit('antrag_email'); //fldReplyEmmail is a field i defined when building a form for the person submitting the form to enter their email address in. I simply pull this form value.
$fromname = ff_getSubmit('antrag_vorname').' '.ff_getSubmit('antrag_name'); // FirstName and Surname are two fields of my form that I simply pull and concatenate, BUT this could be of course anything you want it to be.
$subject = ff_getSubmit('fldSubject'); // flSubject is a hidden field in my form which I have set its value to the subject I want to appear as my email subject. I simply pull it.
$recipient = 'deine@email.ch'; // Here I hardcoded the email where I want the form to be submitted too.
// Create the Body format for use in e-mail. I pull the below bit of code directly from the facile form processor php file,
// with the addition to ignore hidden fields when building the body of the email. I did this because the Hidden fields
// in my form are control fields like fldSubject which I dont want to appear in the submitted form data.
foreach ($this->maildata as $data) {
if ($data[_FF_DATA_TYPE] != 'Hidden Input') {
$body .= $data[_FF_DATA_TITLE].": ".$data[_FF_DATA_VALUE].nl();
}
}
$this->sendMail($from, $fromname, $recipient, $subject, $body); // This line acutally emails off the form.
eigentlich solltest du infos über alle felder erhalten, wenn du nicht ein bestimmtes script eingibst.
mit oben stehendem script erhältst du die angaben die ausgefüllt worden sind. du musst in der formularbearbeitung die funtkion "Emailbenachrichtigung" ausschalten und dann dieses script im übermittlungsreiter in der Endeübermittlung eingeben, einfach meine feldnamen durch deine ersetzen. zusätzlich machst du im formular noch ein verstecktes eingabefeld und nennst es z.b."Betreff". du musst dann noch den wert eingeben. dieser wert erscheint als betreff in deiner email.
gruss patrik
Lesezeichen