Ветеран
Сообщения: 1864
Благодарности: 120
|
Профиль
|
Отправить PM
| Цитировать
А если тупо руками попробывать?
PHP код: ![Выделить весь код](images/misc/selectcode.png)
<?php
$smtp_server = "smtpserver.com";
$port = 25;
$mydomain = "mydomain.com";
$username = "username"; $password = "password";
$sender = "sender email";
$recipient = "email that the content will be sent to";
$subject = "the subject";
$content = "the message";
// SMTP connection
$handle = fsockopen($smtp_server,$port);
fputs($handle, "EHLO $mydomain\r\n");
// SMTP authorization
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:<$recipient>\r\n");
fputs($handle, "DATA\r\n");
fputs($handle, "To: $recipient\n");
fputs($handle, "Subject: $subject\n\n");
fputs($handle, "$content\r\n");
fputs($handle, ".\r\n");
// Close connection to SMTP server
fputs($handle, "QUIT\r\n");
?>
Кстати, Error 530 =
Цитата:
Must issue a STARTTLS command first. Encryption required for requested authentication mechanism.
|
|
-------
Fortes fortuna adiuvat
Отправлено: 21:25, 04-11-2006
| #15
|