![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 21 Pomógł: 0 Dołączył: 23.05.2007 Ostrzeżenie: (10%) ![]() ![]() |
Cześć
chce skorzystać z funkcji mail ale coś mi nie działa. Proszę o rady. Sprawdziłem mam ustawione 25 Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\mail2\index.php on line 43 korzystam z gotowca ze strony php na moim localhost WAMP 2.0 Wpisałem tylko gdzie ma zostać wysłane (IMG:style_emoticons/default/smile.gif) Kod <?php // kilku odbiorców $to = 'sebekss@wp.pl' . ', '; // zwróćmy uwagę na przecinek $to .= 'sebekss@wp.pl'; // temat $subject = 'Birthday Reminders for August'; // wiadomość $message = ' <html> <head> <title>Birthday Reminders for August</title> </head> <body> <p>Here are the birthdays upcoming in August!</p> <table> <tr> <th>Person</th><th>Day</th><th>Month</th><th>Year</th> </tr> <tr> <td>Joe</td><td>3rd</td><td>August</td><td>1970</td> </tr> <tr> <td>Sally</td><td>17th</td><td>August</td><td>1973</td> </tr> </table> </body> </html> '; // Aby wysłać e-mail HTML, musi być ustawiony nagłówek Content-type $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; // Dodatkowe nagłówki $headers .= 'To: Mary <mary@example.com>, Kelly <kelly@example.com>' . "\r\n"; $headers .= 'From: Birthday Reminder <birthday@example.com>' . "\r\n"; $headers .= 'Cc: birthdayarchive@example.com' . "\r\n"; $headers .= 'Bcc: birthdaycheck@example.com' . "\r\n"; // Wysłanie e-maila mail($to, $subject, $message, $headers); ?> |
|
|
![]() ![]() |
![]() |
Aktualny czas: 25.08.2025 - 16:25 |