quite some of you may have noticed that the email form generator sends emails to your inbox with the from header code you have specified in the pwpwcms config. Unfortunately if you just hit the reply button of your email client your customer won't see the email ... I set up the system that the form email sender is me so I will send the answer to myself and feel silly
For those of you that have asked, here a quick hack:
1.
Set up your email form generator that the email that is entered by the customer is in a field that is called 'email', e.g. like this
Code: Select all
IT|Name|0|Titel/Vorname/Name: |40,100||300
IT|Firma|0|Firma: |40,100||300
IT|Strasse|0|Straße: |40,100||300
IT|PLZOrt|0|PLZ/Ort: |40,100||300
IT|Telefon|0|Telefon: |40,100||300
IT|Fax|0|Fax: |40,100||300
IT|email|0|E-Mail: |40,100||300
TA|Nachricht|0|Ihre Nachricht: |40,10||300
IC|Newsletter|0|Newsletter: |300,0|Bitte senden Sie mir ihren Newsletter|0
IH|redirect|0||10,100|http://www.yourdomain.de/index.php?frmsuccess|0
IH|redirect_error|0||10,100|http://www.yourdomain.de/index.php?frmerror|0
Look for, find and open the file /include/inc_act/act_formmailer.php
Go to the line 230 (plus/minus a few lines). You'll find these very eye-catching lines:
Code: Select all
$body.= "\n====================================================================\n";
$body.= "phpwcms formmailer | Copyright (C) 2003 \n";
// phpMailer Class
$mail = new PHPMailer();
$mail->Mailer = $phpwcms['SMTP_MAILER'];
$mail->Host = $phpwcms['SMTP_HOST'];
$mail->Port = $phpwcms['SMTP_PORT'];
if($phpwcms['SMTP_AUTH']) {
$mail->SMTPAuth = 1;
$mail->Username = $phpwcms['SMTP_USER'];
$mail->Password = $phpwcms['SMTP_PASS'];
}
$mail->SMTPKeepAlive = true;
$mail->CharSet = $phpwcms["charset"];
$mail->IsHTML(0);
$mail->Subject = $subject;
$mail->Body = $body;
After the $mail->Body line, add this code
Code: Select all
/* TB reply-to Funktionalität */
if(isset($_POST["email"])) {
$mail->AddReplyTo($_POST["email"]);
}
/* TB Ende */
Save the changes. Before uploading the modified file, make sure to have a backup copy of the original, just for the case. (You will only need this backup file if you don't make the backup )
That's it. Give it a try. Remember that you possibly have to change your email contact form that the senders adress is entered in a field that has the exact name 'email' (lower case, no quotation marks).
Regards
Thomas Blenkers