Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Using a form and mailto


  • Please log in to reply
24 replies to this topic

#1 Wolfy87

Wolfy87

  • Members
  • 414 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:England
  • Local time:07:15 PM

Posted 25 May 2009 - 05:35 AM

I know how to send a forms in puted text to my e-mail but it all comes out on one line, I am using <br /> at the end of each line so what else can i do to put them all on separate lines

Thanks, Wolfy87.

BC AdBot (Login to Remove)

 


#2 KamakaZ

KamakaZ

  • Members
  • 739 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Victoria
  • Local time:06:15 AM

Posted 25 May 2009 - 08:19 AM

from what i can remember i think it is a \n or a \r i honestly can't remember.

i think it will also depend on whether you are using an email client that views the emails as text or html.

Just throwing a few ideas around...

There's no place like 127.0.0.1
There are 10 types of people in the world, those that can read binary, and those who can't.


#3 Wolfy87

Wolfy87
  • Topic Starter

  • Members
  • 414 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:England
  • Local time:07:15 PM

Posted 25 May 2009 - 08:38 AM

Right, I will try that in a sec but is that not used in the Ubuntu/Linux terminal? oh...maby im thinking of c...\n rings a bell somwhere

#4 MadDawg

MadDawg

  • Members
  • 453 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Houston, TX
  • Local time:02:15 PM

Posted 25 May 2009 - 01:35 PM

\n rings a bell somwhere

"\n" moves to the next line in C++, Java, and likely other languages. :thumbsup:
A penguin broke my windows with a half-eaten apple!

#5 KamakaZ

KamakaZ

  • Members
  • 739 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Victoria
  • Local time:06:15 AM

Posted 26 May 2009 - 10:25 PM

how'd you go wolfy?

There's no place like 127.0.0.1
There are 10 types of people in the world, those that can read binary, and those who can't.


#6 Wolfy87

Wolfy87
  • Topic Starter

  • Members
  • 414 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:England
  • Local time:07:15 PM

Posted 29 May 2009 - 02:50 PM

Well I tried this:

<form action="mailto:info@flowwebdesign.co.uk" method="post">
<input type="text" name="username\n">
<input type="text" name="password">
<input type="submit" value="submit">
</form>

Which sort of did nothing but add on the charicter key, then i tried this:

<form action="mailto:info@flowwebdesign.co.uk" method="post">
<input type="text" name="username">\n
<input type="text" name="password">
<input type="submit" value="submit">
</form>

Which also just added on the charicter key, I then tried it with \r for both ways but it still didnt work. I'm not quite sure what is going on here, I suppose i am putting it in the wrong place.

Thanks, Wolfy87.

#7 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:01:15 PM

Posted 29 May 2009 - 04:17 PM

The line break has to be embedded in the email message directly, like this:
This is a \nline of text

#8 KamakaZ

KamakaZ

  • Members
  • 739 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Victoria
  • Local time:06:15 AM

Posted 29 May 2009 - 08:39 PM

aha, so it was \n

There's no place like 127.0.0.1
There are 10 types of people in the world, those that can read binary, and those who can't.


#9 Wolfy87

Wolfy87
  • Topic Starter

  • Members
  • 414 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:England
  • Local time:07:15 PM

Posted 01 June 2009 - 12:35 AM

But it's not exactly text, they are text boxes that I want to display there contents on seperate lines so it is readable so where dose the \n go on it?

Edited by Wolfy87, 01 June 2009 - 12:36 AM.


#10 KamakaZ

KamakaZ

  • Members
  • 739 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Victoria
  • Local time:06:15 AM

Posted 01 June 2009 - 12:41 AM

do you have access to an SMTP server?

There's no place like 127.0.0.1
There are 10 types of people in the world, those that can read binary, and those who can't.


#11 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:01:15 PM

Posted 01 June 2009 - 06:50 AM

But it's not exactly text, they are text boxes that I want to display there contents on seperate lines so it is readable so where dose the \n go on it?

What is in those text boxes? Do you know what the \n does? Did you try writing a test program that uses it in a line of text to see what it does? String manipulation is the most basic of all programming functions tasks.

#12 Wolfy87

Wolfy87
  • Topic Starter

  • Members
  • 414 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:England
  • Local time:07:15 PM

Posted 01 June 2009 - 02:59 PM

Text is in the text boxes, The \n in theory should do something along the lines of <br />, I have tested this but as my question stated

so where dose the \n go on it?

And I do know all about string manipulation (do not take that literally, I do not know all of it obviously). All I wish to know is where to insert the \n in my "<form..." code to make it separate the text boxes text.

Thank you.

#13 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:01:15 PM

Posted 01 June 2009 - 04:10 PM

The new line character is not HTML. You can't use it in HTML. It is text.

How are you trying to send email?

#14 Wolfy87

Wolfy87
  • Topic Starter

  • Members
  • 414 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:England
  • Local time:07:15 PM

Posted 01 June 2009 - 05:17 PM

Yes I see that \n cannot be used in HTML, I am sending the email with a form and it's action being a mailto link and it's method being post, this all work fine, it brings up outlook etc and sends to me (I am currently learning some php that will send it without outlook), the text that has been entered in the text boxes also sends fine. My only problem is how to display them on seperate lines and if I cannot put the \n in the html then where will it go.

Thankyou for your time, Wolfy87.

#15 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:01:15 PM

Posted 01 June 2009 - 06:20 PM

Doing it that way, you can not put in line breaks. That is the limitation of the method you are trying to use. It has nothing to do with how you are email, but rather the program that is being called by the mailto tag.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users