Kod
<?php
$from = "xxxxx <xxxxx@gmail.com>";
$to = "System <xxxxxxx@vp.pl>";
$subject = "System DANE";
$body = "System Body dat NDS";
$host = "smtp.gmail.com";
$username = "xxxxxx@vp.pl";
$password = "********";
$headers = array ('From' => $from,
'To' => $to,
'Subject' => $subject);
$smtp = Mail::factory('smtp',
array ('host' => $host,
'auth' => true,
'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>");
}
?>
$from = "xxxxx <xxxxx@gmail.com>";
$to = "System <xxxxxxx@vp.pl>";
$subject = "System DANE";
$body = "System Body dat NDS";
$host = "smtp.gmail.com";
$username = "xxxxxx@vp.pl";
$password = "********";
$headers = array ('From' => $from,
'To' => $to,
'Subject' => $subject);
$smtp = Mail::factory('smtp',
array ('host' => $host,
'auth' => true,
'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>");
}
?>
Z góry dzięki za odpowiedź.
Wesołych Świat.....
