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
sendmail.php not working
Old 02-15-2007, 08:30 PM Re: sendmail.php not working
Ultra Talker

Posts: 483
Trades: 0
Again, I would suggest removing the @ symbol before the mail call. If you're having problems with the mail function, there's a good chance that that @ is hiding some messages.
__________________

Please login or register to view this content. Registration is FREE
TwistMyArm is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-15-2007, 08:51 PM Re: sendmail.php not working
Average Talker

Posts: 16
Name: Ryan
Trades: 0
Tried that...

this is how my sendmail.php currently looks:

<?php
if(!empty($HTTP_POST_VARS['sender_mail']) || !empty($HTTP_POST_VARS['sender_message']) || !empty($HTTP_POST_VARS['sender_subject']) || !empty($HTTP_POST_VARS['sender_name']) || !empty($HTTP_POST_VARS['sender_company']) || !empty($HTTP_POST_VARS['sender_phone']) || !empty($HTTP_POST_VARS['sender_zip']) || !empty($HTTP_POST_VARS['sender_city']) || !
empty($HTTP_POST_VARS['sender_state']) || !
empty($HTTP_POST_VARS['sender_address']))
{
$to = "brc@brctwincites.com";
$subject = stripslashes($HTTP_POST_VARS['sender_subject']);
$body = stripslashes($HTTP_POST_VARS['sender_message']);
$body .= "\n\n---------------------------\n";
$body .= "Mail sent by: " . $HTTP_POST_VARS['sender_name'] . " <" . $HTTP_POST_VARS['sender_mail'] . ">\n";
$body .= "Company Name: " . $HTTP_POST_VARS['sender_company'] . " \n";
$body .= "Telephone: " . $HTTP_POST_VARS['sender_phone'] . " \n";
$body .= "Address: " . $HTTP_POST_VARS['sender_address'] . " \n";
$body .= "Zip Code: " . $HTTP_POST_VARS['sender_zip'] . " \n";
$body .= "City: " . $HTTP_POST_VARS['sender_city'] . " \n";
$body .= "State: " . $HTTP_POST_VARS['sender_state'] . " \n";
$header = "From: " . $HTTP_POST_VARS['sender_name'] . " <" . $HTTP_POST_VARS['sender_mail'] . ">\n";
$header .= "Reply-To: " . $HTTP_POST_VARS['sender_name'] . " <" . $HTTP_POST_VARS['sender_mail'] . ">\n";
$header .= "X-Mailer: PHP/" . phpversion() . "\n";
$header .= "X-Priority: 1";
if(mail($to, $subject, $body, $header))
{
echo "output=sent";
} else {
echo "output=error";
}
} else {
echo "output=error";
}
?>


Has anyone had a chance to look at my php.ini? now that i have that test script correctly sending out mail I feel like we are very close and a lot of your original suspicions were within the PHP.ini
rysand is offline
Reply With Quote
View Public Profile
 
Old 02-16-2007, 04:32 PM Re: sendmail.php not working
blackhawkpowers's Avatar
Ultra Talker

Posts: 313
Name: Dustin
Location: GA
Trades: 0
$HTTP_POST_VARS should still be $_POST
__________________
A patch is a piece of software which replaces old bugs with new bugs.

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
blackhawkpowers is offline
Reply With Quote
View Public Profile Visit blackhawkpowers's homepage!
 
Old 02-16-2007, 04:56 PM Re: sendmail.php not working
Average Talker

Posts: 16
Name: Ryan
Trades: 0
OK...

Looks like this now:

<?php
if(!empty($_POST['sender_mail']) || !empty($_POST['sender_message']) || !empty($_POST['sender_subject']) || !empty($_POST['sender_name']) || !empty($_POST['sender_company']) || !empty($_POST['sender_phone']) || !empty($_POST['sender_zip']) || !empty($_POST['sender_city']) || !
empty($_POST['sender_state']) || !
empty($_POST['sender_address']))
{
$to = "brc@brctwincites.com";
$subject = stripslashes($_POST['sender_subject']);
$body = stripslashes($_POST['sender_message']);
$body .= "\n\n---------------------------\n";
$body .= "Mail sent by: " . $_POST['sender_name'] . " <" . $_POST['sender_mail'] . ">\n";
$body .= "Company Name: " . $_POST['sender_company'] . " \n";
$body .= "Telephone: " . $_POST['sender_phone'] . " \n";
$body .= "Address: " . $_POST['sender_address'] . " \n";
$body .= "Zip Code: " . $_POST['sender_zip'] . " \n";
$body .= "City: " . $_POST['sender_city'] . " \n";
$body .= "State: " . $_POST['sender_state'] . " \n";
$header = "From: " . $_POST['sender_name'] . " <" . $_POST['sender_mail'] . ">\n";
$header .= "Reply-To: " . $_POST['sender_name'] . " <" . $_POST['sender_mail'] . ">\n";
$header .= "X-Mailer: PHP/" . phpversion() . "\n";
$header .= "X-Priority: 1";
if(mail($to, $subject, $body, $header))
{
echo "output=sent";
} else {
echo "output=error";
}
} else {
echo "output=error";
}
?>

I will give it a try shortly.

thanks again.
rysand is offline
Reply With Quote
View Public Profile
 
Old 02-16-2007, 05:59 PM Re: sendmail.php not working
Average Talker

Posts: 16
Name: Ryan
Trades: 0
Darn! No luck. You click send and nothing happens.
rysand is offline
Reply With Quote
View Public Profile
 
Old 02-16-2007, 07:34 PM Re: sendmail.php not working
Average Talker

Posts: 16
Name: Ryan
Trades: 0
Any chance I could e-mail anyone the site directly for review??

also, although the test is sending the e-mail, i just realized nothing is showing up in the body. Does that indicate anything?

<?php
$to = "me@mydomain.com";
$subject = "Hi!";
$body = "Hi, How are you?";
if (@mail($to, $subject, $message)) {
echo('<p>Mail sent successfully.</p>');
} else {
echo('<p>Mail could not be sent.</p>');
}
?>

Last edited by rysand; 02-16-2007 at 07:37 PM..
rysand is offline
Reply With Quote
View Public Profile
 
Old 02-16-2007, 08:18 PM Re: sendmail.php not working
sabin's Avatar
Skilled Talker

Posts: 68
Trades: 0
There is nothing wrong with the code. You probably set the form up wrong. You need to link the submit button to the php with a GET action... did you do that right?
sabin is offline
Reply With Quote
View Public Profile
 
Old 02-16-2007, 11:19 PM Re: sendmail.php not working
Average Talker

Posts: 16
Name: Ryan
Trades: 0
Quote:
Originally Posted by sabin View Post
There is nothing wrong with the code. You probably set the form up wrong. You need to link the submit button to the php with a GET action... did you do that right?
I have no idea. I am just a Network Admin that got stuck with a site that wasnt quite done by someone who had to move. If it was in HTML id have no problem!
rysand is offline
Reply With Quote
View Public Profile
 
Old 02-17-2007, 03:14 PM Re: sendmail.php not working
sabin's Avatar
Skilled Talker

Posts: 68
Trades: 0
Quote:
Originally Posted by rysand View Post
I have no idea. I am just a Network Admin that got stuck with a site that wasnt quite done by someone who had to move. If it was in HTML id have no problem!
Thats what I'm saying. The PHP code is fine. Is the HTML form linking to the code set up correctly?

<form action="your php" method="GET"> etc
sabin is offline
Reply With Quote
View Public Profile
 
Old 02-17-2007, 04:24 PM Re: sendmail.php not working
Average Talker

Posts: 16
Name: Ryan
Trades: 0
Here is the code for the index.html page:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Building Resources Corp</title>
</head>
<body bgcolor="#ffffff">
<center>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub...ersion=6,0,0,0" width="766" height="700" id="flash" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="main.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="main.swf" quality="high" bgcolor="#ffffff" width="766" height="700" name="flash" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</center>
</body>
</html>
rysand is offline
Reply With Quote
View Public Profile
 
Old 02-17-2007, 06:19 PM Re: sendmail.php not working
Republikin's Avatar
Defies a Status

Posts: 3,189
Trades: 3
Ah, so this is a flash file? Do you have the source file?
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Republikin is offline
Reply With Quote
View Public Profile
 
Old 02-18-2007, 10:55 AM Re: sendmail.php not working
sabin's Avatar
Skilled Talker

Posts: 68
Trades: 0
That doesn't even have a form in it. Just a flash file that probably isn't functional.
sabin is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to sendmail.php not working

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.41146 seconds with 12 queries