Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]jak ustawic adres zwrotny w phpmailer
webspy
post
Post #1





Grupa: Zarejestrowani
Postów: 186
Pomógł: 9
Dołączył: 3.03.2008

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


Witam,

Proszę o pomoc, jak ustawić adres zwrotny w phpmailer 5.2.2?

rozumiem żę muszę cos tu dodać?

  1. $mail->SetFrom($nadawca_mail, $nadawca);


Pozdrawiam
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
aras785
post
Post #2





Grupa: Zarejestrowani
Postów: 859
Pomógł: 177
Dołączył: 29.10.2009

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


Witam. W przykładach pokazują to...
  1. <html>
  2. <head>
  3. <title>PHPMailer - Mail() advanced test</title>
  4. </head>
  5. <body>
  6.  
  7. <?php
  8. require_once '../class.phpmailer.php';
  9.  
  10. $mail = new PHPMailer(true); //defaults to using php "mail()"; the true param means it will throw exceptions on errors, which we need to catch
  11.  
  12. try {
  13. $mail->AddAddress('whoto@otherdomain.com', 'John Doe');
  14. $mail->SetFrom('name@yourdomain.com', 'First Last');
  15. $mail->AddReplyTo('name@yourdomain.com', 'First Last');
  16. $mail->Subject = 'PHPMailer Test Subject via mail(), advanced';
  17. $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically
  18. $mail->MsgHTML(file_get_contents('contents.html'));
  19. $mail->AddAttachment('images/phpmailer.gif'); // attachment
  20. $mail->AddAttachment('images/phpmailer_mini.gif'); // attachment
  21. $mail->Send();
  22. echo "Message Sent OK</p>\n";
  23. } catch (phpmailerException $e) {
  24. echo $e->errorMessage(); //Pretty error messages from PHPMailer
  25. } catch (Exception $e) {
  26. echo $e->getMessage(); //Boring error messages from anything else!
  27. }
  28. ?>
  29. </body>
  30. </html>
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: 14.10.2025 - 14:10