Hi g uys... Help with php submitting form please

  • Cheez00
  • Newbie
  • Newbie
  • User avatar
  • Posts: 7
  • Loc: Lodi, CA

Post 3+ Months Ago

hey whts up, first post here, refered by unflux... ;) k here is my problem, i have a submitting form at my website (http://tek-labs.com its on contact page) and everything works alright accept, when i reply i get this odd error saying i coudlnt reply to them, server was rejected,

when i hit reply, their email is in the adress bar, like it shoud be, now even when i try to create a totally new email, using their adress, it gives me the same error and wil not send, but i can send normally if somone emails me. i think its a problem with the submitting form, here it is,

Code: [ Select ]
<?
$to = "info@tek-labs.com";
$name = $_POST['name'];
$email = $_POST['email'];
$company = $_POST['company'];
$question = $_POST['comments'];
$subject = $_POST['subject'];

$message .= "name: $name - email: $email \r";
$message .= "($comments) \r\n";
$message .= "$question \r\n";
$message .= "($subject) \r\n";
$message .= "($company) \r\n";

$header = "from: $name ($email)";

mail($to, $subject, $message, $header);
?>
  1. <?
  2. $to = "info@tek-labs.com";
  3. $name = $_POST['name'];
  4. $email = $_POST['email'];
  5. $company = $_POST['company'];
  6. $question = $_POST['comments'];
  7. $subject = $_POST['subject'];
  8. $message .= "name: $name - email: $email \r";
  9. $message .= "($comments) \r\n";
  10. $message .= "$question \r\n";
  11. $message .= "($subject) \r\n";
  12. $message .= "($company) \r\n";
  13. $header = "from: $name ($email)";
  14. mail($to, $subject, $message, $header);
  15. ?>
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9089
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

Cheez00 wrote:
when i reply i get this odd error saying i coudlnt reply to them, server was rejected


Are you talking about replying from something like Outlook? or do you reply from your site through a form? and what is giving you this error exactly? a web page or an e-mail?
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9089
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

To me it simply sounds like you need to add your IP to the SMTP accepted list for ips which are allowed to send mail out of the server.
  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Posts: 6376
  • Loc: twitter.com/unflux

Post 3+ Months Ago

which would be my server ;) ;)

the error defaults the email name to @ensim.rackshack.net instead of the
actual email address. whether he types it in manually or not.

what's strange, is that hotmail addresses don't seem to be effected.

I sent him a test email directly, and not from the form and he replied to it
no probs.
  • guitrspaz
  • Graduate
  • Graduate
  • guitrspaz
  • Posts: 106
  • Loc: Baltimore, MD

Post 3+ Months Ago

First of all, the from header needs to be -
Code: [ Select ]
$header = "from: $name <$email>";

I don't usually do it that way though, it'd be easier just put:
Code: [ Select ]
mail($to, $subject, $message, "From: $name<$email>");
  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Posts: 6376
  • Loc: twitter.com/unflux

Post 3+ Months Ago

ther you go! i knew guitrspaz would know. :wink:
  • Cheez00
  • Newbie
  • Newbie
  • User avatar
  • Posts: 7
  • Loc: Lodi, CA

Post 3+ Months Ago

:D thnx!!
  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Posts: 6376
  • Loc: twitter.com/unflux

Post 3+ Months Ago

so, did that fix your problem?
  • guitrspaz
  • Graduate
  • Graduate
  • guitrspaz
  • Posts: 106
  • Loc: Baltimore, MD

Post 3+ Months Ago

glad to be of service ;)

Post Information

  • Total Posts in this topic: 9 posts
  • Users browsing this forum: No registered users and 11 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.