Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Mailer - blad:/
shoes
post
Post #1





Grupa: Zarejestrowani
Postów: 50
Pomógł: 0
Dołączył: 16.05.2008

Ostrzeżenie: (0%)
-----


http://localhost/myapp_dev.php/mymodule/No...%3C/b%3E:%20%20
Undefined%20variable:%20str%20in%20%3Cb%3EC:/phpMailer/class.smtp.php%3C/b%3E%20on%20
line%20%3Cb%3E1092%3C/b%3E%3Cbr%20/%3E%3Cbr%20/%3E%3Cb%3ENotice%3C/b%3E:%20%20
Undefined%20variable:%20str%20in%20%3Cb%3EC:/phpMailer/class.smtp.php%3C/b%3E%20on%20
line%20%3Cb%3E1092%3C/b%3E%3Cbr%20/%3E%3Cbr%20/%3E%3Cb%3ENotice%3C/b%3E:%20%20
Undefined%20variable:%20str%20in%20%3Cb%3EC:/phpMailer/class.smtp.php%3C/b%3E%20on%20
line%20%3Cb%3E1092%3C/b%3E%3Cbr%20/%3E%3Cbr%20/%3E%3Cb%3ENotice%3C/b%3E:%20%20
Undefined%20variable:%20str%20in%20%3Cb%3EC:/phpMailer/class.smtp.php%3C/b%3E%20on%20
line%20%3Cb%3E1092%3C/b%3E%3Cbr%20/%3E%3Cbr%20/%3E%3Cb%3ENotice%3C/b%3E:%20%20
Undefined%20variable:%20str%20in%20%3Cb%3EC:/phpMailer/class.smtp.php%3C/b%3E%20on%20
line%20%3Cb%3E1092%3C/b%3E%3Cbr%20/%3EThere%20has%20been%20a%20mail%20error%20
mail%20sent

co moze powodowac ten blad??

a wysylam tak

  1. <form method="POST" action="<? if (isset($_POST['prod'])) {
  2.  
  3.  require("C:/phpMailer/class.phpmailer.php");
  4.  
  5.  require("C:/phpMailer/language/phpmailer.lang-pl.php");
  6.  require("C:/phpMailer/class.smtp.php");
  7.  
  8.  
  9.  $mail = new PHPMailer();
  10.  
  11.  $mail->From  = "";
  12.  $mail->FromName = "List manager";
  13.  $mail->Host  = "";
  14.  $mail->Mailer  = "";
  15.  
  16.  
  17.  
  18.  $mail->Username = "";//nazwa użytkownika
  19.  $mail->Password = "";//nasze hasło do konta SMTP
  20.  $mail->Mailer = "smtp";
  21.  $mail->SMTPAuth = true;
  22.  $mail->SetLanguage("pl", "C:/phpMailer/language/");
  23.  $mail->Subject = "Mail testowy";//temat maila
  24.  
  25.  // w zmienną $text_body wpisujemy treść maila
  26.  $text_body = "Cześć, chyba phpMailer działa \n\n";
  27.  $text_body .= "Na zawsze Twój, \n";
  28.  $text_body .= "PHPMailer";
  29.  
  30.  $mail->Body = $text_body;
  31.  // adresatów dodajemy poprzez metode 'AddAddress'
  32.  $mail->AddAddress("bmaile@l2.pl","log");
  33.  if(!$mail->Send())
  34.  echo 'There has been a mail error ';
  35.  
  36.  // Clear all addresses and attachments
  37.  $mail->ClearAddresses();
  38.  $mail->ClearAttachments();
  39.  echo 'mail sent ';} ?>" >
  40.  
  41.  <input type="submit" name="prod" value="Do koszyka" />
  42.  </form>


Ten post edytował shoes 18.07.2008, 15:28:54
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
nexis
post
Post #2





Grupa: Zarejestrowani
Postów: 1 012
Pomógł: 109
Dołączył: 26.09.2003
Skąd: nexis.pl

Ostrzeżenie: (0%)
-----


A sprawdzałeś przykład dostarczony z klasą PHPMailer?

  1. <?php
  2.  
  3. include_once('class.phpmailer.php');
  4.  
  5. $mail  = new PHPMailer();
  6.  
  7. $body  = $mail->getFile('contents.html');
  8. $body  = eregi_replace("[]",'',$body);
  9.  
  10. $mail->IsSMTP(); // telling the class to use SMTP
  11. $mail->Host  = "mail.yourdomain.com"; // SMTP server
  12.  
  13. $mail->From  = "name@yourdomain.com";
  14. $mail->FromName  = "First Last";
  15.  
  16. $mail->Subject = "PHPMailer Test Subject via smtp";
  17.  
  18. $mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
  19.  
  20. $mail->MsgHTML($body);
  21.  
  22. $mail->AddAddress("whoto@otherdomain.com", "John Doe");
  23.  
  24. $mail->AddAttachment("images/phpmailer.gif");  // attachment
  25.  
  26. if(!$mail->Send()) {
  27. echo "Mailer Error: " . $mail->ErrorInfo;
  28. } else {
  29. echo "Message sent!";
  30. }
  31.  
  32. ?>
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 26.12.2025 - 07:42