943,949 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Marked Solved
  • Views: 1874
  • PHP RSS
You are currently viewing page 2 of this multi-page discussion thread; Jump to the first page
Jul 24th, 2007
0

Re: Newbie seeks urgent help

Click to Expand / Collapse  Quote originally posted by Luc ...
Taking the 'if' statement away from the mail functions worked :-)
The mail() function returns TRUE or FALSE upon sendin the email.
In order for you to write a decent script, you will have to verify that this mail was sent corrently.

Therefore you will need to wrap your mail() in an IF statement.
Otherwise your just firing an email out there and not getting any response back that it was successfull.

You can also do this to catch error messages instead of doing an if()

@mail(..);

The @ symbol would be an alternative to using the IF statement
Reputation Points: 35
Solved Threads: 5
Junior Poster
dr4g is offline Offline
136 posts
since Apr 2007
Jul 24th, 2007
0

Re: Newbie seeks urgent help

Tnx for the reply but as i stated, everything works except for receiving the name of the contact in the body message of the e-mail.
Luc
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Luc is offline Offline
11 posts
since Jul 2007
Jul 24th, 2007
0

Re: Newbie seeks urgent help

Finally, it's solved:

I didn't define $contato_name.

So adding

PHP Syntax (Toggle Plain Text)
  1.  
  2. $contato_name = $_POST['contato_name'];

did the trick :-)
Luc
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Luc is offline Offline
11 posts
since Jul 2007
Jul 25th, 2007
0

Re: Newbie seeks urgent help

Again, you need to validate your mail() command. By using @ or IF.
Reputation Points: 35
Solved Threads: 5
Junior Poster
dr4g is offline Offline
136 posts
since Apr 2007
Jul 25th, 2007
0

Re: Newbie seeks urgent help

Done :-)
Luc
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Luc is offline Offline
11 posts
since Jul 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Previewing PHP frameset files in browser
Next Thread in PHP Forum Timeline: FTP Help





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC