doing mail stuff
This commit is contained in:
parent
295db7cee7
commit
cfcb95b3ad
45
docroot/html/mailing.php
Normal file
45
docroot/html/mailing.php
Normal file
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
require_once("_head.php");
|
||||
|
||||
mkheader("looping!", "#eee");
|
||||
|
||||
?>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- ======================================================= -->
|
||||
<?php
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
mail(
|
||||
$_POST['email-toaddr'],
|
||||
$_POST['email-subject'],
|
||||
$_POST['email-message'],
|
||||
"From: {$_SERVER['PHP_SELF']} <php@localhost>"
|
||||
);
|
||||
?><p>Sent!</p><p><a href="<?php echo $_SERVER['PHP_SELF']; ?>">clear this</a></p><?php
|
||||
|
||||
} else {
|
||||
?>
|
||||
|
||||
<form name="email-send" action="" method="POST">
|
||||
<label for="email-toaddr">To:</label>
|
||||
<input type="text" id="email-toaddr" name="email-toaddr" />
|
||||
|
||||
<label for="email-subject">Subject:</label>
|
||||
<input type="text" id="email-subject" name="email-subject" />
|
||||
|
||||
<label for="email-message">Message:</label>
|
||||
<textarea name="email-message" id="email-message" rows="10" cols="80"></textarea>
|
||||
|
||||
<input type="submit" name="email-submit" value="Send" />
|
||||
</form>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user