Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> funkcja mail()
kefo
post
Post #1





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 18.05.2005

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


Witam,

zrobilem sobie prosty formularz wysylajacy do mnie maila z trescia wpisana przez goscia strony. Jednak jak chce go wyslac pojawia sie takie cos:
Warning: mail() has been disabled for security reasons in /home4/fi/filtry/mail.php on line 18

czy to moja wina (cos zle zrobilem) czy na serwerze jest zablokowana ta funkcja?
Jak na serwerze to moze znacie jakies miejscie w sieci (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) gdzie ta funkcja zadziala

Dzieki
(IMG:http://forum.php.pl/style_emoticons/default/cool.gif)
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
kefo
post
Post #2





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 18.05.2005

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


(IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif)
a jak mam to zastosowac do swoje formularza - chce zeby wysylal ksywe, maila i tresc.

gdzie co i jak
  1. <?php
  2.  
  3. require(&#092;"class.phpmailer.php\");
  4.  
  5. $mail = new PHPMailer();
  6.  
  7. $mail->IsSMTP();  // send via SMTP
  8. $mail->Host  = &#092;"smtp1.site.com;smtp2.site.com\"; // SMTP servers
  9. $mail->SMTPAuth = true;  // turn on SMTP authentication
  10. $mail->Username = &#092;"jswan\"; // SMTP username
  11. $mail->Password = &#092;"secret\"; // SMTP password
  12.  
  13. $mail->From  = &#092;"from@email.com\";
  14. $mail->FromName = &#092;"Mailer\";
  15. $mail->AddAddress(&#092;"josh@site.com\",\"Josh Adams\"); 
  16. $mail->AddAddress(&#092;"ellen@site.com\");  // optional name
  17. $mail->AddReplyTo(&#092;"info@site.com\",\"Information\");
  18.  
  19. $mail->WordWrap = 50; // set word wrap
  20. $mail->AddAttachment(&#092;"/var/tmp/file.tar.gz\"); // attachment
  21. $mail->AddAttachment(&#092;"/tmp/image.jpg\", \"new.jpg\"); 
  22. $mail->IsHTML(true);  // send as HTML
  23.  
  24. $mail->Subject = &#092;"Here is the subject\";
  25. $mail->Body  = &#092;"This is the <b>HTML body</b>\";
  26. $mail->AltBody = &#092;"This is the text-only body\";
  27.  
  28. if(!$mail->Send())
  29. {
  30.  echo &#092;"Message was not sent <p>\";
  31.  echo &#092;"Mailer Error: \" . $mail->ErrorInfo;
  32.  exit;
  33. }
  34.  
  35. echo &#092;"Message has been sent\";
  36. ?>



bo troche nie kumam (IMG:http://forum.php.pl/style_emoticons/default/withstupidsmiley.gif)

--
(IMG:http://forum.php.pl/uwaga.gif)
aleksander
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: 23.12.2025 - 18:22