Submit Your Article Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > PHP

Reply
 
LinkBack Thread Tools
Old July 15th, 2006, 05:29 AM   #1
New Member
 

Join Date: Jul 2006
Location: spain
Age: 21
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Paul00000001 is on a distinguished road
email problem again

Right i got the basic mail() function to work but i need a if statement. So i did the following code.

<?php
$Firdge = $_POST['ChkFridge'];
$Pool = $_POST['ChkPool'];

if (mail('EMAIL ADDRESS','Form feedback','Message here', 'From: email.com')){
print("<p>Thank you for your enquiry, please go back</p>");
}else{
print("<p>An unknown error has occured, please go back</p>");
}
?>

It seems to work i dont get any errors and the thank you is printed on the screen, i check my inbox but no mail is being sent.
Paul00000001 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old July 15th, 2006, 06:05 AM   #2
Reputable Member
 

Join Date: Feb 2006
Location: Brisbane, Australia
Age: 27
Posts: 104
Thanks: 0
Thanked 1 Time in 1 Post
Rep Altering Power: 0 jimz is on a distinguished road
Re: email problem again

Your if statement is checking to see if the mail function is true, it's not performing the mail function.

You want to say, if 'somethings true', then send the email and print 'thankyou for your enquiry' - else, print 'an unknown error has occured'...


if (somethings true) {
mail('EMAIL ADDRESS','Form feedback','Message here', 'From: email.com');
print("<p>Thank you for your enquiry, please go back</p>");
}else{
print("<p>An unknown error has occured, please go back</p>");
}

Just post again if you have more questions

Cheers,
Jim.
jimz is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old July 15th, 2006, 07:18 AM   #3
New Member
 

Join Date: Jul 2006
Location: spain
Age: 21
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Paul00000001 is on a distinguished road
Re: email problem again

thank you for the info, so simple lol
Paul00000001 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old July 15th, 2006, 04:44 PM   #4
Most Reputable Member
 

Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,307
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 ukgeoff has a spectacular aura about ukgeoff has a spectacular aura about
Re: email problem again

mail() is a boolean function and therefore returns true or false as appropriate.

It is more likely, looking at your code, that your email is being filtered out as spam because your From: email address is not a valid format.
ukgeoff is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

Tags
email , problem , again


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem of valiadation of email begeiste PHP 5 October 11th, 2007 01:40 PM
Problem sending Multiple Attachments w/Email wacara Classic ASP 0 August 9th, 2007 03:50 PM
Dreamweaver Email ATT File Problem Flyaheli PHP 7 August 4th, 2007 02:47 AM
HTML Email Problem!?!?!? uqwebdesign HTML, XHTML and CSS 12 February 22nd, 2007 03:12 AM
asp.net send email problem sunnyko .NET 5 September 12th, 2006 06:31 AM


Search Engine Optimization by vBSEO 3.2.0 RC8