ugrás a tartalomhoz

Levélküldés mail()-lel v. phpmailer-rel Invitelen keresztül

Anonymous · 2005. Nov. 24. (Cs), 16.45
mail():

php.ini beállítás

[mail function]
;For Win32 only.
SMTP = mail.invitel.hu
smtp_port = 25

;For Win32 only.
sendmail_from = sajat##kukac##invitel.hu


Hibaüzenet:

Warning: mail(): SMTP server response: 530 5.7.0 No AUTH command has been given.


phpmailer:

bemásolom a class.phpmailer.php-t és a class.smtp.php-t.
  1. <?php  
  2. require("class.phpmailer.php");  
  3.   
  4. $mail = new PHPMailer();  
  5.   
  6. $mail->IsSMTP();                                      // set mailer to use SMTP  
  7. $mail->Host = "mail.invitel.hu";  // specify main and backup server  
  8. $mail->SMTPAuth = true;     // turn on SMTP authentication  
  9. $mail->Username = "felhaszn";  // SMTP username  
  10. $mail->Password = "jelszo"// SMTP password  
  11.   
  12. $mail->From = "sajat##kukac##invitel.hu";  
  13. $mail->FromName = "Mailer";  
  14. $mail->AddAddress("cimzett##kukac##invitel.hu""cimzett név");  
  15.   
  16.   
  17. $mail->WordWrap = 50;                                 // set word wrap to 50 characters  
  18. $mail->AddAttachment("/var/tmp/file.tar.gz");         // add attachments  
  19. $mail->AddAttachment("/tmp/image.jpg""new.jpg");    // optional name  
  20. $mail->IsHTML(true);                                  // set email format to HTML  
  21.   
  22. $mail->Subject = "Here is the subject";  
  23. $mail->Body    = "This is the HTML message body <b>in bold!</b>";  
  24. $mail->AltBody = "This is the body in plain text for non-HTML mail clients";  
  25.   
  26. if(!$mail->Send())  
  27. {  
  28.    echo "Message could not be sent. <p>";  
  29.    echo "Mailer Error: " . $mail->ErrorInfo;  
  30.    exit;  
  31. }  
  32.   
  33. echo "Message has been sent";  
  34. ?>  
Hibaüzenet:

Message could not be sent.

Mailer Error: The following From address faild: sajat##kukac##invitel.hu


Segítséget szeretnék kérni hogy mi lehet a hiba!!!!!
 
1

mail egyértelmű

Hojtsy Gábor · 2005. Nov. 27. (V), 00.38
A mail() egyértelmű. Nem azonosítod magad, az invitel SMTP pedig (mint minden rendes SMTP) nem enged anonim emial kuldest. A második példád próbáld ki egyszerűbb kóddal, és inkrementálisan haladj a gond megtalálása felé. Lehet, hogy az invitel bevizsgálja, hogy pontosan a felhaszn##kukac##invitel.hu nevet használod-e küldésre.