$from = "someonelse@example.com";
$headers = "From:" . $from;
echo mail ("borutflis1@gmail.com" ,"testmailfunction" , "Oj",$headers);
Ho difficoltà a inviare e-mail in PHP. Ottengo un errore: SMTP server response: 530 SMTP authentication is required
.
Ho avuto l'impressione che puoi inviare e-mail senza SMTP per verificare. So che questa posta verrà probabilmente filtrata, ma al momento non importa.
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = localhost
; http://php.net/smtp-port
smtp_port = 25
; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = someonelse@example.com
Questa è l'installazione nel php.ini
file. Come devo configurare SMTP? Esistono server SMTP che non richiedono alcuna verifica o devo configurare un server da solo?
mail()
funzione integrata di PHP .