pedromartins Posted July 16, 2012 at 11:41 AM Report Share #468830 Posted July 16, 2012 at 11:41 AM boas pessoal, estou a usar um script de recuperar palavras passe que tem na wiki do portugal a programar, mas a funcao mail está-me a dar problemas s: será que me podem ajudar? ths Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:\xampp\htdocs\lostpw.php on line 21 Link to comment Share on other sites More sharing options...
pikax Posted July 16, 2012 at 11:48 AM Report Share #468832 Posted July 16, 2012 at 11:48 AM falta as headers http://pt.php.net/manual/en/function.mail.php - ve o exemplo 2 Por muito mais que que estude só aprendo uma coisa, que ainda tenho muita coisa para aprender. A beleza de um código está em decompor problemas complexos em pequenos blocos simples. "learn how to do it manually first, then use the wizzy tool to save time." "Kill the baby, don't be afraid of starting all over again. Fail soon, learn fast." Link to comment Share on other sites More sharing options...
pedromartins Posted July 16, 2012 at 11:57 AM Author Report Share #468833 Posted July 16, 2012 at 11:57 AM eu usei este código, podes-me dizer onde alterar sff? http://wiki.portugal-a-programar.pt/dev_web:php:recuperacao_password Link to comment Share on other sites More sharing options...
pikax Posted July 16, 2012 at 01:17 PM Report Share #468857 Posted July 16, 2012 at 01:17 PM (edited) tem que adicionar um parametro na funcao mail ou ir ao php.ini e meter o mail predefinido. $headers = 'From: webmaster@example.com' . "\r\n" ; if( mail($user, 'Recuperação de password', 'Olá '.$user.', visite este link '.$link, $headers) ) Edited July 16, 2012 at 01:18 PM by pikax Por muito mais que que estude só aprendo uma coisa, que ainda tenho muita coisa para aprender. A beleza de um código está em decompor problemas complexos em pequenos blocos simples. "learn how to do it manually first, then use the wizzy tool to save time." "Kill the baby, don't be afraid of starting all over again. Fail soon, learn fast." Link to comment Share on other sites More sharing options...
pedromartins Posted July 16, 2012 at 02:19 PM Author Report Share #468866 Posted July 16, 2012 at 02:19 PM eu ja tenho no php.ini , tens aqui a print do php.ini http://prntscr.com/c6fhb e depois tens o sendmail.ini: http://prntscr.com/c6fmm Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now