Solved
Email mittels smtp durch php-script
7 years ago
Ich versuche gerade ein PHP-Script zum Versenden auf SMTP umzurüsten und verstehe gerade nicht wie dazu die Konfiguration aussehen muss.
Können Sie mir bitte helfen was für die einzelnen Parameter eingesetzt werden muss?
Hier ist ein beispielhaftes Script:
require_once "Mail.php";
$from = "Sandra Sender <[xxx]@t-online.de>";
$to = "Ramona Recipient <[xxx]@somewhere.com>";
$subject = "Hi!";
$body = "Hi,How are you?";
$host = "securesmtp.t-online.de";
$port = 465;
$username = "USERNAME";
$password = "PASSWORD";
$headers = array ('From' => $from,
'To' => $to,
'Subject' => $subject);
$smtp = Mail::factory('smtp', array ('host' => $host,
'port' => $port,
'username' => $username,
'password' => $password));
$mail = $smtp->send($to, $headers, $body);
if (PEAR::isError($mail)) {
echo("<p>" . $mail->getMessage() . "</p>");
} else {
echo("<p>Message successfully sent!</p>");
}
*E-Mail-Adressen editiert. Bitte posten Sie keine persönlichen Daten. Nadine H. vom Telekom hilft Team
667
4
This could help you too
1 year ago
208
0
5
624
0
3
1 year ago
224
0
2
You might also be interested in
Request purchasing advice
Fill out our online contact form quickly and easily so that we can advise you personally in a timely manner.
View offers
Informieren Sie sich über unsere aktuellen Website-Angebote.
Accepted Solution
accepted by
7 years ago
herzlich willkommen in unserer Community. Bei Username tragen Sie bitte Ihre E-Mail-Adresse ein uns bei Passwort das E-Mail-Passwort. Dies hat @Kugic ja auch bereits schon mitgeteilt.
Viele Grüße Nadine H.
0