Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Mail Function not working.....Help!
Old 09-28-2010, 01:54 AM Mail Function not working.....Help!
Novice Talker

Posts: 8
Name: Danish
Trades: 0
Hi,

Here I am trying to receive an email from visitors to my website.

But my mail function not working.

Please help.... this is what I am trying..

PHP Code:
$mg $_POST['info'];
    
$em $_POST['email'];
    
$nm $_POST['name'];
    
$to      'info@myemail.com';
    
$subject 'A quote from user.';
    
$message $mg." ".$em." ".$nm;
    
$headers  'MIME-Version: 1.0' "\r\n";
    
$headers 'Content-type: text/html; charset=iso-8859-1' "\r\n";

    
mail($to$subject$message$headers); 
The form.

<form name="askquote" method="post" id="askquote" action="controller/askquote.controller.php">

Please help.
Danish_55 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-28-2010, 03:33 AM Re: Mail Function not working.....Help!
miki86's Avatar
Extreme Talker

Posts: 185
Location: print_r($serbia);
Trades: 0
Try mail function without $headers:

PHP Code:
$mg $_POST['info'];
    
$em $_POST['email'];
    
$nm $_POST['name'];
    
$to      'info@myemail.com';
    
$subject 'A quote from user.';
    
$message $mg."&nbsp;".$em."&nbsp;".$nm;
    
    
mail($to$subject$message); 
miki86 is online now
Reply With Quote
View Public Profile
 
Old 09-28-2010, 04:15 AM Re: Mail Function not working.....Help!
Novice Talker

Posts: 8
Name: Danish
Trades: 0
Yes, I tried without headers...but no success.

Other suggestions??

Thanks for your consideration.
Danish_55 is offline
Reply With Quote
View Public Profile
 
Old 09-28-2010, 05:20 AM Re: Mail Function not working.....Help!
miki86's Avatar
Extreme Talker

Posts: 185
Location: print_r($serbia);
Trades: 0
Then you have a problem with your POST variables, try echoing them out one by one and see if they are set.
PHP Code:
$mg $_POST['info'];
     echo 
$msg "<br />";
$em $_POST['email'];
     echo 
$em "<br />";
$nm $_POST['name'];
     echo 
$nm "<br />"
miki86 is online now
Reply With Quote
View Public Profile
 
Old 09-28-2010, 07:02 AM Re: Mail Function not working.....Help!
Novice Talker

Posts: 8
Name: Danish
Trades: 0
THanks miki86,

I'll try that, thanks a lot.
Danish_55 is offline
Reply With Quote
View Public Profile
 
Old 09-29-2010, 03:18 PM Re: Mail Function not working.....Help!
Novice Talker

Posts: 5
Name: yessss
Trades: 0
try with 2 headers
swarz is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Mail Function not working.....Help!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.21089 seconds with 12 queries