/    Sign up×
Community /Pin to ProfileBookmark

emails not being sent

Hello,

I created a php email form using front page 2003. The issue im having is once you fill out the form and hit submit it doesnt send the email, it tells you the email has been sent but i never receive it. Please Help. Thank You
here is the php code

<?php
require_once(‘recaptchalib.php’);
$privatekey = “xxxxxxxxxxxxxxxx”;
$resp = recaptcha_check_answer ($privatekey,
$_SERVER[“REMOTE_ADDR”],
$_
POST[“recaptcha_challenge_field”],
$_POST[“recaptcha_response_field”]);
if (!$resp->is_valid) {
die (“The reCAPTCHA wasn’t entered correctly. Go back and try it again.” .
“(reCAPTCHA said: ” . $resp->error . “)”);
}
?>

<body style=”text-align: center”>

<td width=”500″ />
<div align=”center”>
<!–webbot BOT=”GeneratedScript” PREVIEW=” ” startspan –><script Language=”JavaScript” Type=”text/javascript”><!–

function FrontPage_Form1_Validator(theForm)
{

if (theForm.Name.value == “”)
{
alert(“Please enter a value for the “Name” field.”);
theForm.Name.focus();
return (false);
}

if (theForm.Name.value.length < 6)
{
alert(“Please enter at least 6 characters in the “Name” field.”);
theForm.Name.focus();
return (false);
}

if (theForm.Email.value == “”)
{
alert(“Please enter a value for the “Email” field.”);
theForm.Email.focus();
return (false);
}

if (theForm.Email.value.length < 6)
{
alert(“Please enter at least 6 characters in the “Email” field.”);
theForm.Email.focus();
return (false);
}
return (true);
}
</div>
//–></script><!–webbot BOT=”GeneratedScript” endspan –><form method=”POST” name=”FrontPage_Form1″ action=”../_derived/nortbots.htm”

onsubmit=”location.href=’/php_scripts/Thank_You.htm’;return false;”

language=”JavaScript” webbot-onSubmit=”return

FrontPage_Form2_Validator(this)” webbot-action=”–WEBBOT-SELF–“>
<!–webbot bot=”SaveResults” startspan S-Email-Format=”TEXT/PRE”
S-Email-Address=”[email protected]” B-Email-Label-Fields=”TRUE”
B-Email-Subject-From-Field=”FALSE” S-Email-Subject=”Good Vibrations

Motorsports”
S-Builtin-Fields=”REMOTE_NAME REMOTE_USER Date Time”

B-Email-ReplyTo-From-Field=”TRUE” S-Email-ReplyTo=”[email protected]

S-Date-Format=”%A, %B %d, %Y” S-Time-Format=”%I:%M:%S %p” –><input TYPE=”hidden” NAME=”VTI-GROUP” VALUE=”0″><!–webbot bot=”SaveResults” endspan

i-checksum=”43374″ –>
<h3 align=”center”><font size=”5″>Information/Quote Request

Form</font></h3>
<p align=”center”><b><font size=”4″>Please Use the Following Form If You

Have any Questions
or Comments.</font></b></p>
<table border=”1″ width=”453″>
<tr>
<td width=”88″>
<p align=”center”><b><em><font size=”5″>Name</font></em></b></td>
<td>
<!–webbot bot=”Validation” b-value-required=”TRUE” i-minimum-length=”6″ –><input name=”Name” value size=”35″></td>
</tr>
<tr>
<td width=”88″><b><em><font size=”5″>E-mail</font></em></b></td>
<td>
<!–webbot bot=”Validation” b-value-required=”TRUE” i-minimum-length=”6″ –><input type=”TEXT” name=”Email” value size=”35″></td>
</tr>
<tr>
<td width=”88″><b><em><font size=”5″>Remarks</font></em></b></td>
<td><textarea rows=”8″ name=”Remarks” cols=”41″></textarea></td>
</tr>
</table>
<p><input type=”submit” value=”Submit Request” name=”submit”> <input

type=”RESET” value=”Reset Form”></p>
</form></td>
</tr>
</table></div>

thank you for your time

to post a comment
PHP

6 Comments(s)

Copy linkTweet thisAlerts:
@NatdripJul 19.2012 — you'll need to configure your apache to send emails
Copy linkTweet thisAlerts:
@NONAME323authorJul 19.2012 — Hello Natdrip,

This form was already working once before. Our company started getting mass spam emails. So i created a ReCaptcha and had to relocate the form on a separate page in order for it to work properly. When i moved the form to the new page and changed it from html to php thats when this issue happened. Because this form was already working do you still think i have to re-setup the apache? Thank You
Copy linkTweet thisAlerts:
@criterion9Jul 19.2012 — you'll need to configure your apache to send emails[/QUOTE]

That's bunk.


Apache has nothing to do with sending emails. An SMTP server has something to do with sending emails.

OP- Can you check your mail server logs to see if the email actually left? If it did leave it might be getting stopped by spam trapping.
Copy linkTweet thisAlerts:
@PedroskiJul 20.2012 — No quite right.

If you use apache you need the sendmail module and you must configure php.ini to find sendmail. (/usr/sbin/sendmail or something like that) Having said that, I have done this, and my mails still won't leave my laptop. Haven't tried my page on an actual webserver yet.
Copy linkTweet thisAlerts:
@criterion9Jul 20.2012 — No quite right.

If you use apache you need the sendmail module and you must configure php.ini to find sendmail. (/usr/sbin/sendmail or something like that) Having said that, I have done this, and my mails still won't leave my laptop. Haven't tried my page on an actual webserver yet.[/QUOTE]


php.ini is not configuring Apache, it is configuring PHP to tell it where your SMTP service/server is located in order to use the mail() function. You must have a running mail service in order for the emails to be sent.
Copy linkTweet thisAlerts:
@PedroskiJul 20.2012 — Here is a bit of php.ini If you use Windoze, you will configure smtp with it. I prefer Linux. I suppose you can use a php cli and use php separate from Apache, but does anyone do that??

[mail function]

; For Win32 only.

; http://php.net/smtp

SMTP = localhost

; http://php.net/smtp-port

smtp_port = 25

; For Win32 only.

; http://php.net/sendmail-from

;sendmail_from = [email][email protected][/email]

; For Unix only. You may supply arguments as well (default: "sendmail -t -i").

; http://php.net/sendmail-path

sendmail_path = "/usr/sbin/sendmail"
×

Success!

Help @NONAME323 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...