BleepingComputer.com: Using a form and mailto

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.

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Using a form and mailto

#1 User is offline   Wolfy87 

  • Senior Member
  • PipPipPipPip
  • Find Topics
  • Group: Members
  • Posts: 414
  • Joined: 25-July 08
  • Gender:Male
  • Location:England

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.

#2 User is offline   KamakaZ 

  • Senior Member
  • PipPipPipPip
  • Find Topics
  • Group: Members
  • Posts: 548
  • Joined: 26-August 08
  • Gender:Male
  • Location:Victoria

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...
If I am helping you and don't reply in 24 hours please send me a PM

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 User is offline   Wolfy87 

  • Senior Member
  • PipPipPipPip
  • Find Topics
  • Group: Members
  • Posts: 414
  • Joined: 25-July 08
  • Gender:Male
  • Location:England

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 User is offline   MadDawg 

  • Senior Member
  • PipPipPipPip
  • Find Topics
  • Group: Members
  • Posts: 452
  • Joined: 09-July 07
  • Gender:Male
  • Location:Houston, TX

Posted 25 May 2009 - 01:35 PM

View PostWolfy87, on May 25 2009, 08:38 AM, said:

\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 User is offline   KamakaZ 

  • Senior Member
  • PipPipPipPip
  • Find Topics
  • Group: Members
  • Posts: 548
  • Joined: 26-August 08
  • Gender:Male
  • Location:Victoria

Posted 26 May 2009 - 10:25 PM

how'd you go wolfy?
If I am helping you and don't reply in 24 hours please send me a PM

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 User is offline   Wolfy87 

  • Senior Member
  • PipPipPipPip
  • Find Topics
  • Group: Members
  • Posts: 414
  • Joined: 25-July 08
  • Gender:Male
  • Location:England

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 User is offline   groovicus 

  • Hail Groovicus!
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Moderator
  • Posts: 9,522
  • Joined: 05-June 04
  • Gender:Male
  • Location:Centerville, SD

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
"Take the risk of thinking for yourself, much more happiness, truth, beauty, and wisdom will come to you that way" - Christopher Hitchens

#8 User is offline   KamakaZ 

  • Senior Member
  • PipPipPipPip
  • Find Topics
  • Group: Members
  • Posts: 548
  • Joined: 26-August 08
  • Gender:Male
  • Location:Victoria

Posted 29 May 2009 - 08:39 PM

aha, so it was \n
If I am helping you and don't reply in 24 hours please send me a PM

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 User is offline   Wolfy87 

  • Senior Member
  • PipPipPipPip
  • Find Topics
  • Group: Members
  • Posts: 414
  • Joined: 25-July 08
  • Gender:Male
  • Location:England

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?

This post has been edited by Wolfy87: 01 June 2009 - 12:36 AM


#10 User is offline   KamakaZ 

  • Senior Member
  • PipPipPipPip
  • Find Topics
  • Group: Members
  • Posts: 548
  • Joined: 26-August 08
  • Gender:Male
  • Location:Victoria

Posted 01 June 2009 - 12:41 AM

do you have access to an SMTP server?
If I am helping you and don't reply in 24 hours please send me a PM

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 User is offline   groovicus 

  • Hail Groovicus!
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Moderator
  • Posts: 9,522
  • Joined: 05-June 04
  • Gender:Male
  • Location:Centerville, SD

Posted 01 June 2009 - 06:50 AM

Quote

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.
"Take the risk of thinking for yourself, much more happiness, truth, beauty, and wisdom will come to you that way" - Christopher Hitchens

#12 User is offline   Wolfy87 

  • Senior Member
  • PipPipPipPip
  • Find Topics
  • Group: Members
  • Posts: 414
  • Joined: 25-July 08
  • Gender:Male
  • Location:England

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

Quote

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 User is offline   groovicus 

  • Hail Groovicus!
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Moderator
  • Posts: 9,522
  • Joined: 05-June 04
  • Gender:Male
  • Location:Centerville, SD

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?
"Take the risk of thinking for yourself, much more happiness, truth, beauty, and wisdom will come to you that way" - Christopher Hitchens

#14 User is offline   Wolfy87 

  • Senior Member
  • PipPipPipPip
  • Find Topics
  • Group: Members
  • Posts: 414
  • Joined: 25-July 08
  • Gender:Male
  • Location:England

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 User is offline   groovicus 

  • Hail Groovicus!
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Moderator
  • Posts: 9,522
  • Joined: 05-June 04
  • Gender:Male
  • Location:Centerville, SD

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.
"Take the risk of thinking for yourself, much more happiness, truth, beauty, and wisdom will come to you that way" - Christopher Hitchens

Share this topic:


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users