KENNTNISSE
PEAR: Mails von PHP versenden.
Zuletzt aktualisiert 2020-04-05
Diese Probe verwendet das Pear Mail Paket. Das Paket befindet sich bereits im INCLUDE-Pfad.
http://pear.php.net/package/Mail
<?
include once("Mail.php")
$recipients = 'mail to@domain.mail';
$headers["From"] = 'mail from@domain.mail';
$headers["To"] = 'mail to@domain.mail';
$headers["Subject"] = "Testnachricht";
$body = "TEST MESSAGE!!!"
$params["host"] = 'smtp.domainHosted'.com;
$params["port"] = "25";
$params["auth"] = wahr;
$params["Benutzername"] = 'account@domainHosted.com';
$params["password"] = "password";
// Erstellen Sie das Mail-Objekt mit der Mail::factory-Methode
$mail object = & Mail::factory("smtp", $params);
$mail object->send($recipients, $headers, $body);
echo "E-Mail gesendet".
?>
Diese Beispiele funktionieren möglicherweise nicht für Sie ohne bestimmte Änderungen.
Der Zweck der Beispiele ist es, Ihnen eine allgemeine Vorstellung von dem Thema zu geben.
http://pear.php.net/package/Mail
<?
include once("Mail.php")
$recipients = 'mail to@domain.mail';
$headers["From"] = 'mail from@domain.mail';
$headers["To"] = 'mail to@domain.mail';
$headers["Subject"] = "Testnachricht";
$body = "TEST MESSAGE!!!"
$params["host"] = 'smtp.domainHosted'.com;
$params["port"] = "25";
$params["auth"] = wahr;
$params["Benutzername"] = 'account@domainHosted.com';
$params["password"] = "password";
// Erstellen Sie das Mail-Objekt mit der Mail::factory-Methode
$mail object = & Mail::factory("smtp", $params);
$mail object->send($recipients, $headers, $body);
echo "E-Mail gesendet".
?>
Diese Beispiele funktionieren möglicherweise nicht für Sie ohne bestimmte Änderungen.
Der Zweck der Beispiele ist es, Ihnen eine allgemeine Vorstellung von dem Thema zu geben.
Sagen Sie uns, was aufbleiben muss.
A short conversation with an engineer. No quote-bot, no callback queue. We'll tell you honestly if we're not the right fit.