Welcome to Tech Support Forum home to more then 136,000 problems solved. Issues have included: Spyware, Malware, Virus Issues, Windows, Microsoft, Linux, Networking, Security, Hardware, and Gaming Getting your problem solved is as easy as:
1. Registering for a free account
2. Asking your question
3. Receiving an answer

Registered members:
* Get free support
* Communicate privately with other members (PM).
* Removal of this message
* See fewer ads.
* And much more..

 



Want to know how to post a question? click here Having problems with spyware and pop-ups? First Steps
Go Back   Tech Support Forum > Design Forum > Web Design & Programming
User Name
Password
Site Map Register Donate Rules Blogs Mark Forums Read


Web Design & Programming Discussion of web design, and server-side & client-side scripting

Reply
 
LinkBack Thread Tools
Old 09-01-2007, 01:12 AM   #1 (permalink)
Registered User
 
Join Date: Aug 2005
Location: Ohio
Posts: 207
OS: VISTA


malformed recipient address - PHP

hi i am woking on making a quiz using PHP for a role play site i belong to. the user inputs there name and there email and then it sends the information to my email. Instead of sending to my email however I get an email in my host email that i host my stuff on saying

Quote:
A message that you sent contained a recipient address that was incorrectly
constructed:

From: missing or malformed local part (expected word or "<")

The message has not been delivered to any recipients.
I have made an email form in the past and it works fine. So i made this exacly the same except i added the quiz information to the send file.

heres the driver:
Code:
<?php
  $score = 0;
  if ($_POST['question1'] == 'a')
    ++$score;
  if ($_POST['question2'] == 'a')
    ++$score;



  $name = $_REQUEST['Name'];
  $email = $_REQUEST['Email'];
 

   mail( "blah@blah.com", "Feedback Form Results",
      $name, $score, "From: $email");

?>



YOUR SCORE IS: <? echo $score ?>
note i changed the email as to not give mine out.
every thing is spelled the same and the caps are all the same as they are in the HTML document
Damion is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Important Information
Join the #1 Tech Support Forum Today - It's Totally Free!

TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free.

Join TechSupportforum.com Today - Click Here

Old 09-01-2007, 03:18 PM   #2 (permalink)
Design Team Member
 
Redcore's Avatar
 
Join Date: Aug 2007
Location: Jamestown, CA
Posts: 715
OS: Linux Mint 7

My System

Re: malformed recipient address - PHP

You should use the PHP tags instead of CODE tags in the forum so the syntax is highlighted.

Try combining $name and $score - it's probably interpreting $score as "additional headers" and so on. They have to be in this order in order to function correctly:

PHP Code:
mail($to$subject$message$additional_headers$additional_parameters
So try it this way:
PHP Code:
$message $name " scored a " $score "/2 in the quiz."// reads "Bob scored a 2/2 in the quiz."

mail"blah@blah.com""Feedback Form Results"$message"From: $email"); 
Let me know if that fixes it for you. It should ;)

Last edited by Redcore; 09-01-2007 at 03:19 PM.
Redcore is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 09-11-2007, 06:03 AM   #3 (permalink)
Registered User
 
Join Date: Aug 2005
Location: Ohio
Posts: 207
OS: VISTA


Re: malformed recipient address - PHP

yes it works like every other time i try it wich for now is good enouoph. (my processor melted so i just now got to try it) thanks for all the help. I am going to try to stop asking questions i need to learn this stuff on my own, i was just to busy now i am finaly into my web classes so i have time for it
Damion is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 09-11-2007, 01:48 PM   #4 (permalink)
Design Team Member
 
Redcore's Avatar
 
Join Date: Aug 2007
Location: Jamestown, CA
Posts: 715
OS: Linux Mint 7

My System

Re: malformed recipient address - PHP

Welcome back!

I'm glad you want to learn stuff on your own - but don't worry about asking questions. Sometimes it's just more helpful to have someone explain a concept that nobody seems to answer in a way you understand. I wish I had this kind of forum when I was first starting, I've probably spent more time reverse-engineering PHP code to figure out what each PHP function does than anybody I know just because I didn't have anybody to explain it in HUMAN terms :P

Last edited by Redcore; 09-11-2007 at 01:49 PM.
Redcore is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 09-11-2007, 03:17 PM   #5 (permalink)
Registered User
 
Join Date: Aug 2005
Location: Ohio
Posts: 207
OS: VISTA


Re: malformed recipient address - PHP

lol , thanks and glad to be back. My teacher tried to force me to use dreamweaver monday ewwww.
Damion is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 09-11-2007, 11:44 PM   #6 (permalink)
Design Team Member
 
Redcore's Avatar
 
Join Date: Aug 2007
Location: Jamestown, CA
Posts: 715
OS: Linux Mint 7

My System

Re: malformed recipient address - PHP

haha...come to the dark side...
Redcore is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 09-12-2007, 06:53 AM   #7 (permalink)
Registered User
 
Join Date: Aug 2005
Location: Ohio
Posts: 207
OS: VISTA


Re: malformed recipient address - PHP

ohhh that remineds me speaking of the dark side. I have a question for you. Don't look in to it or anything this is just to see if it has hapend to you so i know weather i can rule out hostgator as the problem. I have a code for a extremly basic user name and password filed and it worked on the free host i use to use. I moved it over to host gator and i get an error that says method post is not allowd. I thought maybe they din't have short script enabled so i changed all the <? ?> to <?PHP ?> and thats not the problem so im trying to narrow it down, have you ever had simular problems with hostgator?
Damion is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 09-13-2007, 01:08 AM   #8 (permalink)
Design Team Member
 
Redcore's Avatar
 
Join Date: Aug 2007
Location: Jamestown, CA
Posts: 715
OS: Linux Mint 7

My System

Re: malformed recipient address - PHP

I've never had this problem - I have simple to advanced scripts, and everything in between. If you want to post the code, I can see if I can get it worked out for you.
Redcore is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 09-13-2007, 05:09 PM   #9 (permalink)
Registered User
 
Join Date: Aug 2005
Location: Ohio
Posts: 207
OS: VISTA


Re: malformed recipient address - PHP

maybe in a week or so if i can't figure it out, i wan't to try to fix this one eventualy i will give up if i can't get it but problem solving is a verry inportant part of beeing a programmer . thanks though
Damion is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -7. The time now is 01:39 PM.



Copyright 2001 - 2009, Tech Support Forum
Home Tips Plus | Outdoor Basecamp | Automotive Support Forum

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85