Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
wfpl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b03e19d
)
metaform calls email() correctly, and uses reply_to field
author
Jason
<jason@parth.(none)>
Thu, 24 Jul 2008 22:28:50 +0000
(18:28 -0400)
committer
Jason
<jason@parth.(none)>
Thu, 24 Jul 2008 22:28:50 +0000
(18:28 -0400)
metaform/template.php
patch
|
blob
|
history
diff --git
a/metaform/template.php
b/metaform/template.php
index
e62b1d7
..
a0b657f
100644
(file)
--- a/
metaform/template.php
+++ b/
metaform/template.php
@@
-141,19
+141,19
@@
function _~form_name~_main() {<!--~opt_http_pass_2 start~-->
}<!--~end~--><!--~opt_email_2 start~-->
if($GLOBALS['~form_name~_form_recipient'] != "fixme@example.com") {
$to = $GLOBALS['~form_name~_form_recipient'];
}<!--~end~--><!--~opt_email_2 start~-->
if($GLOBALS['~form_name~_form_recipient'] != "fixme@example.com") {
$to = $GLOBALS['~form_name~_form_recipient'];
+ $from = $to;
+ $reply_to = '';
if(isset($_REQUEST['email']) and valid_email($_REQUEST['email'])) {
if(isset($_REQUEST['email']) and valid_email($_REQUEST['email'])) {
- $from = $_REQUEST['email'];
+ $reply_to = $_REQUEST['email'];
if($_REQUEST['name'] and ereg('^[a-zA-Z0-9_\' -]*$', $_REQUEST['name']) !== false) {
if($_REQUEST['name'] and ereg('^[a-zA-Z0-9_\' -]*$', $_REQUEST['name']) !== false) {
- $from = "$_REQUEST[name] <$from>";
+ $reply_to = "$_REQUEST[name] <$reply_to>";
}
}
- } else {
- $from = $to;
}
$subject = '~form_name~ form submitted';
$message = tem_run('~form_name~.email.txt');
$cc = '';
$bcc = '';
}
$subject = '~form_name~ form submitted';
$message = tem_run('~form_name~.email.txt');
$cc = '';
$bcc = '';
- if(email($from, $to, $subject, $message, $cc, $bcc)) {
+ if(email($from, $to, $subject, $message, $reply_to, $cc, $bcc)) {
message('Due to an internal error, your message could not be sent. Please try again later.');
$error = true;
}
message('Due to an internal error, your message could not be sent. Please try again later.');
$error = true;
}