Hallo, ich möchte dass ein php Kontaktformular, was für mich erstellt wurde, auf meine aol email Adresse weitergeleitet wird. Hab im Netz schon nach Hilfe gesucht, aber nichts gefunden (was ich verstehe)
flowIIpoker hat mir zwar was geschickt, aber alles in Englisch und selbst wenn es in Deutsch wäre, würde ich wahrscheinlich immer noch nicht verstehen
Das, was ich von meinem Programmierer bekomme, ist die Aussage:
I can do this for you
Send me your mail server address its something like mail.domain.com or smtp.domain.com and send me a email, username and password of that email.
Super. ![]()
Was soll "mail.domain.com or smtp.domain.com" sein? Was will er von mir?
Ich habe zwar eine Datenbank, die mir vor Jahren von jemand anderes eingerichtet worden ist, aber auch die versteh ich natürlich auch nicht. Ich hab da weniger als Null Ahnung von sowas.
Was muss ich wo eintragen? Ich will doch nur ne einfache Weiterleitung der Kontaktfelder an meine aol Mail Adresse.
<?php
require (dirname(__FILE__) . '/phpmailer/PHPMailerAutoload.php');
if ($_SERVER['REQUEST_METHOD'] == "POST") {
$name = $_POST['name'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$address = $_POST['address'];
$subject = $_POST['subject'];
$msg = $_POST['msg'];
// send email
$mail = new PHPMailer();
$mail->isSMTP();
$mail->isHTML(false);
$mail->Host = 'smtp.gmail.com'; // Change for your hosting mail subdomain
$mail->Port = 587; // Change port
$mail->SMTPAuth = true;
$mail->SMTPSecure = "tls"; // SSL or TLS?
$mail->Username = 'put your email here';
$mail->Password = 'put password here';
$mail->setFrom("$email", "$name");
$mail->addAddress('put your email here');
$mail->Subject = "Website: $subject";
$mail->Body = "Name: $name \n" .
"Email: $email \n" .
"Phone: $phone \n" .
"Address: $address \n" .
"Message: $msg";
if(!$mail->send()) {
header('Location: index.html');
exit;
} else {
die ('Can\'t send email. Please contact administrator.');
exit;
}
}
?>
