/    Sign up×
Community /Pin to ProfileBookmark

problem with emailing script

ok i have this job application page that im trying to make for a friend and the code for the html page is this

[code=html]<html>
<head><title>Job Applications</title></head>
<body text=”white” bgcolor=”black”>

<form method=”post” action=”appproccess.php”>
<input type=”text” name=”habname” size=”20″>:Habbo Name<br>
<input type=”text” name=”mail” size=”30″>:Email Address<br>
<input type=”text” name=”name” size=”20″>:Name<br>
<input type=”text” name=”age” size=”10″>:Age<br>
<SELECT NAME=”job” SIZE=”1″>
<OPTION SELECTED>Pick one
<OPTION>Radio DJ
<OPTION>News Reporter
<OPTION>Counciler
<OPTION>Alternist
</SELECT>:Job<br>
<SELECT NAME=”skill” SIZE=”1″>
<OPTION SELECTED>Choose one
<OPTION>Yes
<OPTION>No
</SELECT>:Do You Have Skill/Equipment needed<br>
<TEXTAREA NAME=”yshouldweacceptyou” ROWS=6 COLS=40></TEXTAREA>:Why should we accept you?<br>
<input type=”submit” value=”Submit”><input type=”reset”>

</body>
</html>[/code]

and then it sends that information to this page

[code=php]<html>
<head><title>Thank you for submiting your job application</title></head>
<body>

<?php
$habname = $_POST[‘habname’];
$mail = $_POST[‘mail’];
$name = $_POST[‘name’];
$age = $_POST[‘name’];
$job = $_POST[‘job’];
$skill = $_POST[‘skill’];
$yshouldweacceptyou = $_POST[‘yshouldweacceptyou’];
?>
<?php $message=”Job Application Recieved:
nn”.$habname.$mail.$name.$age.$job.$skill.$yshouldweacceptyou;
if(!mail(“[email protected]”,”Job Application”,$message))
die(“Error”);
?>
</body>
</html>[/code]

which takes all the submitted information and sends it in a email and when i run it on my server it comes up with no errors but when i run it on my local server thats on my computer it comes up with this one error

[CODE]Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for [email protected] in c:inetpubwwwrootappproccess.php on line 16
Error[/CODE]

how do i fix this?

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@welshNov 25.2005 — not sure but with:
[code=php]$age = $_POST['name'];[/code]
you got age set to post name. might wanna change that.
Copy linkTweet thisAlerts:
@Heavy_MetalauthorNov 25.2005 — o thanks for pointing that out
Copy linkTweet thisAlerts:
@SheldonNov 25.2005 — is your server set up in the php.ini for sending email? and your sendmail path is correct?
Copy linkTweet thisAlerts:
@NogDogNov 25.2005 — Possibly due to missing header information. See if this helps, changing the From and Reply-To addresses as appropriate:
[code=php]
$headers = "From: [email protected]" .
"Reply-To: [email protected]" .
"X-Mailer: PHP/" . phpversion();
if(!mail("[email protected]","Job Application",$message, $headers))
die("Error");
[/code]
Copy linkTweet thisAlerts:
@SpectreReturnsNov 25.2005 — Seeing as I've recently set up a SMTP server, I got this error too. Check your software to make sure that it is allowed to relay mail, that's what was wrong with mine.
×

Success!

Help @Heavy_Metal 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,
)...