Go to Post Common sense goes a long way. - Akash Rastogi [more]
Home
Go Back   Chief Delphi > Technical > IT / Communications > Website Design/Showcase
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 17-01-2005, 11:54
robot180's Avatar
robot180 robot180 is offline
Webmaster, spamrobotics.com
AKA: Jon
FRC #0180 (S.P.A.M.)
Team Role: Alumni
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Stuart, FL
Posts: 414
robot180 is a name known to allrobot180 is a name known to allrobot180 is a name known to allrobot180 is a name known to allrobot180 is a name known to allrobot180 is a name known to all
Send a message via AIM to robot180
return line commands in PHP

I could use some help. I am using the mail() function to send an email in a "helpdesk" like program. I have the person's name and email address attach to the message, however I want to put a few blank lines in between. I used the \n, \r, and \t commands in between them, but they don't do anything.

Another thing I need help with is that the mail function allows you to put other headers in. Do I need to enter anything in those?
__________________
-Jon
Computer Science Major
Georgia Tech
Former Team Leader
FRC Team 180
  #2   Spotlight this post!  
Unread 17-01-2005, 12:26
Unsung FIRST Hero
Greg Marra Greg Marra is offline
[automate(a) for a in tasks_to_do]
FRC #5507 (Robotic Eagles)
Team Role: Mentor
 
Join Date: Oct 2004
Rookie Year: 2005
Location: San Francisco, CA
Posts: 2,030
Greg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond repute
Re: return line commands in PHP

If it was an HTML e-mail you could just toss in a couple <br>'s...
  #3   Spotlight this post!  
Unread 17-01-2005, 19:05
evulish's Avatar
evulish evulish is offline
1010100
AKA: Grant Harding
#0084 (WATTNESS (bot: Chuck))
Team Role: Alumni
 
Join Date: Jul 2002
Location: Towanda/Wysox, PA
Posts: 1,434
evulish is just really niceevulish is just really niceevulish is just really niceevulish is just really nice
Send a message via AIM to evulish
Re: return line commands in PHP

No, it's not necessary to add any other headers to mail(). There are some you may want, such as the From, Reply-To, Content-Type, MIME-Version, To, CC, BCC. It should work just fine with none, though. Using \n in the body should also work unless you've specified a different Content-Type (like HTML, which doesn't care about new-lines). If you're checking it on a Windows client, you may need to use \r\n, but I'm not positive.
__________________
I'm a professional web developer. I'm good with PHP, Perl, Java/JSP, some RoR, XML, Javascript (AJAX as well), (x)HTML, CSS, etc.. Validated code is good; fully cross-browser code is better (you comply to your users and the software they use, not the other way around. Sorry!)
  #4   Spotlight this post!  
Unread 17-01-2005, 19:37
Jack's Avatar
Jack Jack is offline
FIRST Scouting Network
AKA: Andrew Schenk
FRC #0201 (The FEDS)
Team Role: Alumni
 
Join Date: Feb 2002
Rookie Year: 2002
Location: Rochester Hills
Posts: 643
Jack is a jewel in the roughJack is a jewel in the roughJack is a jewel in the rough
Send a message via AIM to Jack
Re: return line commands in PHP

99% sure on this.. if you use single quotes 'text\ntest'.. the new line doesn't happen. you need to use double quotes "text\ntest" instead.

jack
__________________
Team 201 - 2003 Great Lakes Semifinalists & 2003 Archimedes Division Finalists :|: Webmaster of www.feds201.com -> FBI Scouting
Winner of The 2003 ChiefDelphi Web Award for: User That Started The Most Non Chit Chat Threads
Winner of: 2003 FIRST Ventures with 5451.68 End Points

All about me: http://knehcsa.vze.com
**Check out the New FIRST Scouting Network**
  #5   Spotlight this post!  
Unread 20-01-2005, 14:59
robot180's Avatar
robot180 robot180 is offline
Webmaster, spamrobotics.com
AKA: Jon
FRC #0180 (S.P.A.M.)
Team Role: Alumni
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Stuart, FL
Posts: 414
robot180 is a name known to allrobot180 is a name known to allrobot180 is a name known to allrobot180 is a name known to allrobot180 is a name known to allrobot180 is a name known to all
Send a message via AIM to robot180
Re: return line commands in PHP

Quote:
Originally Posted by Jack
99% sure on this.. if you use single quotes 'text\ntest'.. the new line doesn't happen. you need to use double quotes "text\ntest" instead.

jack
I put it in single quotes. Sorry it took so long to answer. I always use single quotes unless I use nested quotes. Thanks.
__________________
-Jon
Computer Science Major
Georgia Tech
Former Team Leader
FRC Team 180
  #6   Spotlight this post!  
Unread 18-01-2005, 21:31
AIBob's Avatar
AIBob AIBob is offline
AI Programmer
AKA: Bob Frank DOT org
FRC #0358 (Hauppauge Robotic Eagles)
Team Role: Alumni
 
Join Date: Jan 2005
Rookie Year: 2003
Location: Long Island, NY (in Binghamton now)
Posts: 297
AIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to behold
Send a message via ICQ to AIBob Send a message via AIM to AIBob Send a message via MSN to AIBob Send a message via Yahoo to AIBob
Re: return line commands in PHP

Quote:
Originally Posted by robot180
Another thing I need help with is that the mail function allows you to put other headers in. Do I need to enter anything in those?
You do not need to put any other headers in it for many webhosts... It really depends on what the webhost has it set as..
Usually webhosts require you to put the From: header.... but that is not always the case.
__________________
- from B B frank

  #7   Spotlight this post!  
Unread 19-01-2005, 00:47
steven114 steven114 is offline
Programming Wizard and Team Captain
AKA: Steven Schlansker
FRC #0114 (Eaglestrike)
Team Role: Programmer
 
Join Date: Feb 2004
Location: Los Altos, CA
Posts: 335
steven114 is a jewel in the roughsteven114 is a jewel in the roughsteven114 is a jewel in the rough
Send a message via AIM to steven114
Re: return line commands in PHP

I believe the standard requires \r\n between header lines. At least that's what I use for my PHP mails and it works great...
__________________
Shift to the left, shift to the right!
Pop up, push down, byte, byte, byte!
  #8   Spotlight this post!  
Unread 19-01-2005, 02:22
HFWang's Avatar
HFWang HFWang is offline
Registered User
AKA: DarkWulf
#0115
Team Role: Webmaster
 
Join Date: Jan 2003
Location: Cupertino
Posts: 177
HFWang will become famous soon enough
Send a message via ICQ to HFWang Send a message via AIM to HFWang
Re: return line commands in PHP

Quote:
Originally Posted by robot180
I could use some help...
We've all guessed... but did it work?

I feel like I'm reading a mystery novel but can't find the last chapter.
__________________
rawr
  #9   Spotlight this post!  
Unread 19-01-2005, 10:26
steven114 steven114 is offline
Programming Wizard and Team Captain
AKA: Steven Schlansker
FRC #0114 (Eaglestrike)
Team Role: Programmer
 
Join Date: Feb 2004
Location: Los Altos, CA
Posts: 335
steven114 is a jewel in the roughsteven114 is a jewel in the roughsteven114 is a jewel in the rough
Send a message via AIM to steven114
Re: return line commands in PHP

http://cr.yp.to/docs/smtplf.html
__________________
Shift to the left, shift to the right!
Pop up, push down, byte, byte, byte!
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
openFIRST PHP 5 Compatibility Timothy D. Ginn FIRST-related Organizations 0 30-07-2004 13:45
Sprockets and Roller Chain Models Madison Inventor 3 04-02-2003 11:51
iParts on firstcadlibrary.com Ed Sparks Inventor 3 08-01-2003 23:30
emulationFIRST v0.04 Matt Leese Programming 7 09-07-2002 08:54
What's better, PERL/cgi or PHP/my_sql? mikefrei Programming 10 27-05-2002 22:50


All times are GMT -5. The time now is 02:54.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi