Prosim dajte mi niekto JEDNODUCHY funkcny kod. Nic mi nefunguje, uz mam paradne nervy. A nejaky phpmailer ktory ma milion riadkov moze ist do
Toto som nsiel
Kód:
<?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");
?>
ale nefunguje to, nastavil som dobry smtp server, meno aj heslo, to domain neviem co je, nikde inde to nechcelo odomna(ale dal som tam seznam.cz kde mam smtp)
Dakujem velmi pekne