Dlaczego ten skrypt nie wysyla maila?
$subject="Materiały do egzaminów zawodowych";
$body="Aby ściągnąć zamówione materiały zaloguj się na stronie: http://www.boleslaw.ugu.pl/autentykacja.html\r\nTwój login: $login\r\nTwoje hasło: $haslo";
$adres=$email;
$smtp_server = "mail.ugu.pl";
$port = 25;
$mydomain = "localhost";
$username = "boleslaw.angielskizawodowy.ugu.pl";
$password = "haslo";
$sender = "boleslaw@angielskizawodowy.ugu.pl";
$handle = fsockopen($smtp_server,$port);
if ($handle==null)
{
echo "No connection to SMTP server";
exit;
}
else
{
fputs($handle, "EHLO $mydomain\r\n");
fputs($handle, "AUTH LOGIN\r\n");
fputs($handle, base64_encode($username)."\r\n");
fputs($handle, base64_encode($password)."\r\n");
// Send out the e-mail
fputs($handle, "MAIL FROM:<$sender>\r\n");
fputs($handle, "RCPT TO:<$email>\r\n");
fputs($handle, "DATA\r\n");
fputs($handle, "To: $email\n");
fputs($handle, "Subject: $subject\n\n");
fputs($handle, "$body\r\n");
fputs($handle, ".\r\n");
// Close connection to SMTP server
fputs($handle, "QUIT\r\n");
}