Forums

Small Bug: Newline for "Submitted by IP"

leolll 09 Jun, 2009
If you use "Plain Text" email form and record IP, you'll get this:

Name: Bill
Email: [email]blah@example.comSubmitted[/email] by 127.0.0.1



Notice the "Submitted by.." line appends itself to the last line in my email template. The simple fix is this:

Change this:
$email_body .= "Submitted by ".$_SERVER['REMOTE_ADDR'];


To this:
$email_body .= "\nSubmitted by ".$_SERVER['REMOTE_ADDR'];


This shouldn't cause any bad side effects for HTML formatted emails either.
Max_admin 14 Jun, 2009
Hi leolll,

thanks for sharing this idea, another trick is also to use the {IPADDRESS} in your template and so the IP will be placed wherever its and not in the end!

Regards
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
This topic is locked and no more replies can be posted.