email sending #13
@ -45,5 +45,6 @@ Your password:<br>
|
|||||||
|
|
||||||
<input type="submit" value="GO">
|
<input type="submit" value="GO">
|
||||||
</form>
|
</form>
|
||||||
|
<a href="forgot.php">forgot password</a>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
24
sendmail.php
Normal file
24
sendmail.php
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
//Thats not sendmail (the well known php function)
|
||||||
|
//It's merely a little try to reimplement some basic features for this project.
|
||||||
|
//And YES! I'm aware that this is hacky as shit!
|
||||||
|
|
||||||
|
//Sending Address:
|
||||||
|
$sender = 'forgotpassword@invalid.example.com';
|
||||||
|
//ReplyTo (should at least be valid!):
|
||||||
|
$replyto = 'spamme+somephpshit@td00.de';
|
||||||
|
session_start();
|
||||||
|
$mailrcpt = $_SESSION['mailrcpt'];
|
||||||
|
$mailsubject = $_SESSION['mailsubject'];
|
||||||
|
$mailbody = $_SESSION['mailbody'];
|
||||||
|
|
||||||
|
$to = $mailrcpt;
|
||||||
|
$subject = $mailsubject;
|
||||||
|
$message = $mailbody;
|
||||||
|
$headers = 'From: '.$sender.' '. "\r\n" .
|
||||||
|
'Reply-To: '.$replyto.' '. "\r\n" .
|
||||||
|
'X-Mailer: PHP/' . phpversion();
|
||||||
|
|
||||||
|
mail($to, $subject, $message, $headers);
|
||||||
|
?>
|
||||||
|
<h1>Maybe there is a mail in your inbox now...</h1>
|
Loading…
x
Reference in New Issue
Block a user