9 Replies - 1974 Views - Last Post: 09 July 2006 - 05:45 AM Rate Topic: -----

#1 chitara  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 89
  • Joined: 16-December 05

mail function

Posted 02 July 2006 - 10:43 PM

HI!

I am working with a simple feed back form.

Here, when user will submit their feedback it will store in a define mail account.


But after submitting the form no mail is storing the that mail account.

My code is as follows:

<html>
 <head>
 <title>Feedback</title>
 </head>
 <body>
 <?
 if(isset($submit)){
  $to = "username@yahoo.com"; // Enter YOUR email here
 $subject = "Feedback for the Website!";
$body = "A test for feedback on the site!\n";
 $body .= "Their feedback is:\n\n";
 $body .= $feedback;
 mail($to, $subject, $body);
 print("<h2>Thanks for your feedback!</h2>");
 } else {
?>
<form action="<?php echo $PHP_SELF; ?>" method="POST">
<h2>Please Send us your Feedback</h2>
<textarea cols=35 rows=15 name="feedback">
</textarea>
<br>
<input type="submit" name="submit" value="Submit">
</form>
<?
 }
 ?>
</body>
 </html>








Please help me!!!

This post has been edited by chitara: 06 July 2006 - 04:03 AM


Is This A Good Question/Topic? 0
  • +

Replies To: mail function

#2 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,506
  • Joined: 12-July 02

Re: mail function

Posted 03 July 2006 - 06:18 AM

When you mention storing the mail in adefined account, do you mean saving that email message, or sending? If sending, has the system been properly configured to send mail?
Was This Post Helpful? 0
  • +
  • -

#3 snoj  Icon User is offline

  • Married Life
  • member icon

Reputation: 84
  • View blog
  • Posts: 3,564
  • Joined: 31-March 03

Re: mail function

Posted 03 July 2006 - 08:54 AM

Is your spam filter catching it? I've had troubles with that before.
Was This Post Helpful? 0
  • +
  • -

#4 chitara  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 89
  • Joined: 16-December 05

Re: mail function

Posted 06 July 2006 - 04:02 AM

I think, according to my script when any user would submit the feedback from, its message part will be stored in that specific email account.

And there will be the text "Thanks for your feedback!" which user'll get after the submission of the form.


Am I wrong?


Even nothing is storing as the spam mail!!! I've already checked it.

And one more thing. I've done this work b4 but the server was different at that time. I have asked to the server authority this time about having sendmail option... but they didn't reply anything.



Now please tell me what to do.

Its very urgent. Actually in this project the client wnats to store aal the feedback in their specified mail account, not in any database(table).


Please help me!!!!!!!!!!!!!1


Regards

This post has been edited by chitara: 06 July 2006 - 04:05 AM

Was This Post Helpful? 0
  • +
  • -

#5 chitara  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 89
  • Joined: 16-December 05

Re: mail function

Posted 08 July 2006 - 05:22 AM

Hi There!

I want to share you all that the server authority has informed me as follows-

"Hello,

sednmail is supported on the server. Please insure your scripts work with php 5_+. If there is anything else we can do for you, please let us know.

Thnank you."

Now please is there anyone who can help me.


I am waiting!!!!
Was This Post Helpful? 0
  • +
  • -

#6 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,506
  • Joined: 12-July 02

Re: mail function

Posted 08 July 2006 - 06:59 AM

What exactly is the problem? If you send the mail, does it get to the intended recipient? If yes, then is the problem that the mail is not being stored in the sent mail folder of the sender?
Was This Post Helpful? 0
  • +
  • -

#7 chitara  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 89
  • Joined: 16-December 05

Re: mail function

Posted 08 July 2006 - 08:54 PM

I want to store all the feedback of the website in the define ($to = "username@yahoo.com) mail account.


Its just so simple!!

But what's wrong with it????? No mail is storing to that ($to = "username@yahoo.com) mail account.

Please tell me what's the problem is!!!!

This post has been edited by chitara: 08 July 2006 - 08:56 PM

Was This Post Helpful? 0
  • +
  • -

#8 snoj  Icon User is offline

  • Married Life
  • member icon

Reputation: 84
  • View blog
  • Posts: 3,564
  • Joined: 31-March 03

Re: mail function

Posted 08 July 2006 - 09:28 PM

Have you tried sending test mail to another account? Preferably with a different provider (think hotmail or gmail).

Also, how about you stick error_reporting(E_ALL) at the beginning of your code? If there is an error with the mail function you'll know.
Was This Post Helpful? 0
  • +
  • -

#9 chitara  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 89
  • Joined: 16-December 05

Re: mail function

Posted 09 July 2006 - 05:42 AM

Ho yea hotsnoj, you are right. After chaining the account the mail is storing but, there is another problem.

Please check the following .....
**[
$message = "<center><html><body><br><p style='margin-left: 2; margin-right: 15' class=body1><font face='arial' color='#999999'>Name &nbsp;&nbsp;".$name."<br>Address :&nbsp;&nbsp;".$adr."<br>Country :&nbsp;&nbsp;".$country."<br>Phone No :&nbsp;&nbsp;".$phn."<br>Occupation :&nbsp;&nbsp;" .$occu. "<br>Comments :&nbsp;&nbsp;".$msg."\n<br><font></center></body></html>";

]**
In the mail message the html tags are getting visible. Please tell me what to do.
Was This Post Helpful? 0
  • +
  • -

#10 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,506
  • Joined: 12-July 02

Re: mail function

Posted 09 July 2006 - 05:45 AM

To send HTML email, I believe the content headers have to be set to html...there is an example here:
http://ca3.php.net/function.mail
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1