Witam.
Szukałem już wszędzie ale nie mogę znaleźć odpowiedzi jak wysyłać maile w wampie.
PHP
$headers = "From: [email protected]\r\n";
mail('[email protected]', 'Witaj', 'Oto test funkcji mail',$headers);
php.ini z folderu Apache2.2.21:
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = smtp.gmail.com
; http://php.net/smtp-port
smtp_port = 25
; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = [email protected]
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
;sendmail_path =
; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =
; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
mail.add_x_header = On
; Log all mail() calls including the full path of the script, line #, to address and headers
;mail.log =
Niestety mail się nie wysyła a w apache_error.log mam taki bład:
error] [client 127.0.0.1] PHP Warning: mail() [<a href='function.mail'>function.mail</a>]: SMTP server response: 530 5.7.0 Must issue a STARTTLS command first. x19sm23150994fag.5 in C:\\wamp\\www\\part_list\\views\\part_list\\rejestracja.php on line 41, referer: http://127.0.0.1/part_list/index.php?view=rejestracja&value=0
Jak to naprawić ? :)