I'm trying to set up a contact page using formemail.php. When testing, everything works except that it doesn't email the message itself. It sends an email with FROM, SUBJECT, but no MESSAGE. Looking at formemail.php (I only have limited php knowledge, so if I am wrong, don't fault me), I didn't see anywhere that the message value is getting passed and posted.
BTW, notice how it fills in the variables in the above code with your forum URL - could there be a potential security risk in allowing that to occur with your forum?
Probably not, since the posted text isn't being altered in any way and it's showing the correct number of line breaks for me in my test. Maybe some differce between your email client and browser in dealing with line breaks, or something related to unix/windows differences.
asd@sdfd.com has filled out a form with this content:
subject: test line breaks
message: Hi. This is a second line.
This is the fourth line.
The sixth. The seventh.
The tenth. Okay?
0/5
1
2
3
4
5
This thread is closed, so you cannot post a reply.
Comments on formemail.phpnot working
Forum Regular
Usergroup: Customer
Joined: Jun 02, 2004
Total Topics: 32
Total Comments: 142
I'm trying to set up a contact page using formemail.php. When testing, everything works except that it doesn't email the message itself. It sends an email with FROM, SUBJECT, but no MESSAGE. Looking at formemail.php (I only have limited php knowledge, so if I am wrong, don't fault me), I didn't see anywhere that the message value is getting passed and posted.
My contact.php file:
My contact.tpl file:
BTW, notice how it fills in the variables in the above code with your forum URL - could there be a potential security risk in allowing that to occur with your forum?
Thanks,
Adam
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Testing {DIRURL} here. I can't figure out where in the world the https://www.webmastersite.net/forums/ you have is coming from.
Anyhow, it's possible that 'message' is a value that gets interfered with somewhere in start.php, so you could try another variable name.
Forum Regular
Usergroup: Customer
Joined: Jun 02, 2004
Total Topics: 32
Total Comments: 142
Nope, changed the "message" variable to "mymessage" and it still doesn't work. Emails all the entered info except for that one.
Forum Regular
Usergroup: Customer
Joined: Jun 02, 2004
Total Topics: 32
Total Comments: 142
Just wondering if you are able to duplicate this problem through your demo of WSN Links.
-Adam
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Confirmed, it needs a
reset($_POST);
above
while(list($key, $value) = each($_POST))
Forum Regular
Usergroup: Customer
Joined: Jun 02, 2004
Total Topics: 32
Total Comments: 142
That fixed it.
I noticed that for every blank line in the message I type, it puts two blank lines in the email I receive. Is this something fixable?
Adam
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Probably not, since the posted text isn't being altered in any way and it's showing the correct number of line breaks for me in my test. Maybe some differce between your email client and browser in dealing with line breaks, or something related to unix/windows differences.
subject: test line breaks
message: Hi.
This is a second line.
This is the fourth line.
The sixth.
The seventh.
The tenth. Okay?