Jump to content
Sign in to follow this  
pedromartins

funcao mail

Recommended Posts

pedromartins

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

Share this post


Link to post
Share on other sites
pikax

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."

Share this post


Link to post
Share on other sites
pikax

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 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."

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.