PDA

Zobacz pełną wersję : Problem z joomla pod PHP5



aroncz
26-03-2008, 20:23
Witam.

Oto moj problem:
Od jakiegos czasu firma gdzie mam hosting zmienila PHP4.x.x na PHP5 i podczas gdy user sie rejestruje na stronie i ma otrzymac email z linkiem aktywujacym to go te maile nie dochodza

skrypty byluy sprawdzane i nie ma bledow, wiec mysle ze to wina przejscia na PHP5

ma ktos podobny problem?
jakis pomysl co z tym zrobic aby maile dochodzily?

PHP Version: 5.2.3
Joomla! Version: Joomla! 1.0.13 Stable

pozdrawiam

aroncz

Slawcio
26-03-2008, 22:17
Mam to samo.
Ale kiedy jako administrator dopisuje usera, to email jest mu wysylany i dochodzi.
Czy to wina PHP?

aroncz
27-03-2008, 19:26
pisalem to tej firmy hostingowej ze mam powyzszy problem z mailali, odpisali i podali link to ten informacji:


EXAMPLE: 'Form to mail' script using PHP
Important: You are responsible for the misuse of any scripts on your website. See our article Securing your web scripts for further details.

Summary

This article gives an example of how to use a PHP script to take input from a feedback form and send it to you in an email message.

Note: PHP pages will not work if placed in cgi-bin. They need to be in the htdocs directory.

Example

The following example uses a PHP script to take input from a feedback form and send it to you in an email message.

First of all, you need a form to receive the data, e.g. feedback.html:

feedback.html

The form asks the visitor for his/her email address (via the email field above) and message (via the message field above), and invites the visitor to click a button to submit the contents of the form. When the form is submitted, it is 'posted' to a script named sendmail.php. Next, you need to create the sendmail.php script, using the facilities available in PHP, e.g.

ini_set("sendmail_from", " user@yourdomain.com ");

mail( "yourname@yourdomain.com", "Feedback Form

results",$_POST['message'], "From: $_POST['email']", "-fuser@yourdomain.com" );

header( "Location: http://www.yourdomain.com/thankyou.html" );

When the form is submitted to sendmail.php, the contents of the email field in the form are inserted into a PHP variable called $email, and the contents of the message field are inserted into the variable $message. The script calls a special function called mail, which takes care of the actual dispatch. The first parameter to mail is the address to which you want the form contents sent, in this case your own email address. The second parameter is the subject of the email message, the third is the content of the message, and the fourth is the "From" header so that you know who the sender is, and can reply.

In order for the script to work, you need to specify, via a fifth -f parameter, the domain from which the mail is being sent. The PHP component uses SMTP, and all Fasthosts' SMTP servers have filters which ensure that the data returned by either the first or fifth mail parameter relates to one of your domains hosted by Fasthosts. The final part of the script thanks the visitor for the message. This is done by sending an HTTP header back to the visitor's browser telling it to load a file called thankyou.html from your domain. The header function allows you to send any HTTP header back to the browser.

Note: The script has to be enclosed within the "<?" and "?>" tags because the PHP processor treats all input as HTML code unless otherwise specified. On some systems, you may need to use "<?php" and "?>" as the opening and closing tags to get the script to work.


czy tu sa jakies info aby pomogly??