/    Sign up×
Community /Pin to ProfileBookmark

smtp server, mail()

My application.html

[code]
<html>
<body>

<FORM ACTION=”mailapplication.php” METHOD=post>

Are you
<input name=”male” type=radio> Male or
<input name=”female” type=radio>Female <p>

Player introduction (name to be called by, country, timezone, etc.) <br><textarea name=”playerintro” cols=48 rows=4></textarea><br>

Roleplaying / background story of your character<br> <textarea name=”background” cols=48 rows=4></textarea><br>

Reasons why you wish to join <br><textarea name=”whyjoin” cols=48 rows=4></textarea><br>

Goals <br><textarea name=”goals” cols=48 rows=4></textarea><br>

Expectations of our guild<br><textarea name=”expectations” cols=48 rows=4></textarea><br>

What you can offer<br><textarea name=”offer” cols=48 rows=4></textarea><br>

Character info (level, house, residence)<br><textarea name=”charinfo” cols=48 rows=4></textarea><br>

<P><INPUT TYPE=”SUBMIT” value=”send”> <INPUT TYPE=”RESET”>
</FORM>

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

My mailapplication.php

[code=php]
<?php
$message = $_POST[“”];

mail([email protected], Application Order of Banor, $message, $headers);
?>
[/code]

My problem is i dont know how what command is for letting my script know what smtp server to use.
And for the $_POST[“”]; i dont know what to put here.

someone help please

to post a comment
PHP

11 Comments(s)

Copy linkTweet thisAlerts:
@bokehNov 02.2005 — Those settings are dealt with in php.ini. Are you using Linux or windows? Is this on your local machine?
Copy linkTweet thisAlerts:
@acemoauthorNov 02.2005 — 
In spite of the low price, quality has never been compromised. All servers are of the best Hewlett-Packard quality with redundant power supplies, mirrored SCSI disks with daily external tape-backup.

The systems are placed in a private server room at Interxion in Denmark. The server room has redundant power circuits, battery backup, diesel generators and a Vesda (Very early Smoke Detection Alarm) smoke alarm system.

Our backbone is fibre-based with redundant infrastructure. The total bandwidth is at present 2 x 1 Gigabit multi-homed attached and connected to 3 international carriers, Global Crossing, Deutsche Telecom and Level3, in addition to Danish Internet eXchange.
[/quote]


This is all they say about the're servers

Not my local machine.
Copy linkTweet thisAlerts:
@bokehNov 02.2005 — That's just a list of hardware! And you haven't decribed the problem you are having?
Copy linkTweet thisAlerts:
@acemoauthorNov 02.2005 — I know its just a list of the hardware, cant find anything bout the software.

My problems are that (i think i need to) let my script know what smtp server to use.

And what the user fills in in the form, how do i get this information into variables in the php script?
Copy linkTweet thisAlerts:
@SheldonNov 03.2005 — where are you setting "$headers"???

for your mailapplication.php

you need to pull the posted information th out in the $message

like so

[code=php]
<?php
$sender = "[email protected]"; // sender email address, can use $sender = {$_POST['email']; if you had an email feild
$headers = "From: $senderrnReply-to: $sender";



$playerintro = $_POST['playerintro'];
$background = $_POST['background'];

$whyjoin = $_POST['whyjoin'];

$goals = $_POST['goals'];

$expectations = $_POST['expectations'];

$offer = $_POST['offer'];

$charinfo = $_POST['charinfo'];

$message = "Player Introduction: $playerintrorn
Background: $backgroundrn
Why they joined: $whyjoinrn
Their Goals: $goalsrn
Expectations: $expectationsrn
What they can offer: $offerrn
Their info: $charinforn
Thanks";
//the message to be sent


if(mail([email protected], Application Order of Banor, $message, $headers)){
header("location: thanks.php");//if successfull send to this page
}else{
print 'error try again another time if you feel lucky';//error, you can print a message rather than send them to another page
}


?>
[/code]


just for an example
Copy linkTweet thisAlerts:
@bokehNov 03.2005 — My problems are that (i think i need to) let my script know what smtp server to use.

And what the user fills in in the form, how do i get this information into variables in the php script?[/QUOTE]
What happens when you try to send mail?
Copy linkTweet thisAlerts:
@acemoauthorNov 03.2005 — i get a blank page, i check my mail, no mail arived.
Copy linkTweet thisAlerts:
@bokehNov 03.2005 — Most likely because you have display errors switched off. Make a file and name it
[code=html].htaccess[/code]
The leading dot is correct. Put the following contents in the file and then put the file in your route directory.
[code=php]php_admin_value display_errors on
php_admin_value error_reporting E_ALL[/code]

Now you should see some output.
Copy linkTweet thisAlerts:
@acemoauthorNov 03.2005 — Thanks sheldon, ur script helped me alot wif this, and i also found why it didnt sended the mails:
[code=php]
mail([email protected], Application Order of Banor, $message, $headers)
[/code]

has to be:
[code=php]
mail("[email protected]", "Application Order of Banor", $message, $headers)
[/code]


bokeh thanks for the information about the error showing, am sure will come in handy sometime ?
Copy linkTweet thisAlerts:
@SheldonNov 03.2005 — Nt a wory, i onlyhope that i help a bit.
Copy linkTweet thisAlerts:
@acemoauthorNov 03.2005 — yea, u was great help, thanks ?
×

Success!

Help @acemo 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 6.18,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...