Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> wysylanie maili, czy da sie wysylac maile nie posiadajac serwera pocztowego???
-Gość_janek_*-
post 4.06.2006, 15:30:32
Post #1





Goście







tak jak w temacie
Zastanawia mnie czy mogę wysyłać maile nie posiadająć własnego serwera pocztowego a wykorzystać już istniejące?questionmark.gif

znalazłem taki skrypt:

  1. <?php
  2. class eMail {
  3. var $to;
  4. var $subject;
  5. var $content;
  6. var $headers;
  7. var $marker;
  8. var $type;
  9. var $xMailer = "iGol Mail";
  10.  
  11. function eMail($type = "1", $from = "test<test@ktenbit.pl>", $replyto = "test <test@ktenbit.pl>")
  12. {
  13. $this->type = $type;
  14. $this->headers .= "From: " . $from . "n";
  15. $this->headers .= "Reply-to: " . $replyto . "n";
  16. $this->headers .= "X-Mailer: " . $this->xMailer . "n";
  17. $this->headers .= "MIME-Version: 1.0n";
  18. if ($type == 1) { // text/plain
  19. $this->headers .= "Content-Type: text/plain; charset=iso-8859-2n";
  20. } else {
  21. srand((double)microtime() * 1000000);
  22. $this->marker = md5(uniqid(rand()));
  23. $this->headers .= "Content-Type: multipart/mixed;n";
  24. $this->headers .= "tboundary="___" . $this->marker . "=="nn";
  25. $this->content = "--___" . $this->marker . "==n";
  26. $this->content .= "Content-Type: text/plain; charset="iso-8859-2"n";
  27. $this->content .= "Content-Transfer-Encoding: 8bitnn";
  28. } 
  29. } 
  30.  
  31. function eMailAttachment($mimeType, $fileName, $data)
  32. {
  33. if ($this->type != 1) {
  34. $this->content .= "nn--___" . $this->marker . "==n";
  35. $this->content .= "Content-Type: " . $mimeType . "; name="" . $fileName . ""n";
  36. $this->content .= "Content-Transfer-Encoding: base64n";
  37. $this->content .= "Content-Disposition: attachment; filename="" . $fileName . ""nn";
  38. $this->content .= chunk_split(base64_encode($data));
  39. } 
  40. } 
  41.  
  42. function eMailSend($to)
  43. {
  44. if ($this->type != 1) {
  45. $this->content .= "--___" . $this->marker . "==--nn"; // close marker
  46. } 
  47. mail ($to, $this->subject, $this->content, $this->headers);
  48. } 
  49.  
  50. function eMailContent($subject, $content)
  51. {
  52. $this->subject = $subject;
  53. $this->content .= $content;
  54. } 
  55. } 
  56.  
  57. ?>

niestety on nie działa działa i nie wiem jak to rozwiązać ;(
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 1)
erix
post 4.06.2006, 22:43:33
Post #2





Grupa: Moderatorzy
Postów: 15 467
Pomógł: 1451
Dołączył: 25.04.2005
Skąd: Szczebrzeszyn/Rzeszów




Mozesz wysylac maile korzystajac z serwera smtp.
Poszukaj na www.phpclasses.org albo www.hotscripts.com.

Jest tego mase.


--------------------

ZCE :: Pisząc PW załączaj LINK DO TEMATU i TYLKO w sprawach moderacji :: jakiś błąd - a TREŚĆ BŁĘDU? :: nie ponaglaj z odpowiedzią via PW!
Go to the top of the page
+Quote Post

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

 



RSS Wersja Lo-Fi Aktualny czas: 14.07.2025 - 13:02