Δημοσιεύτηκε: 20 Φεβ 2012, 18:49
από medigeek
Θα μπορούσαμε να φτιάξουμε php script που να στέλνει email κάπου.
http://php.net/manual/en/function.mail.php

Π.χ. troubleshooting.ubuntu-gr.org/suggestmail.php
Κώδικας: Επιλογή όλων

<html><body>
<?php
if (!isset($_REQUEST['message'])) { exit("No message attached.\n"); }
$to = 'troubleshooting@ubuntu-gr.org';
$subject = 'Suggestion';
$from = 'anonymous@ubuntu-gr.org';
if (isset($_REQUEST['from'])) { $from = $_REQUEST['from']; }
$message = $_REQUEST['message'];
$headers = 'From:' . $from;
mail($to, $subject, $message, $headers);
echo "Mail sent.";
?>
</body></html>


Το μόνο που θα δέχεται θα είναι to $message και ενδεχομένως το $from.
Θα στέλνει σε κάποια mailing list ή στο email σου (redirect από troubleshooting@ubuntu-gr.org σε σένα).

Αν γίνει αυτό, υποθέτω πως μπορώ να προσθέσω μια μίνι φόρμα «επικοινωνίας» στο index.html. :)

http://www.w3schools.com/php/php_mail.asp