beez Posted August 13, 2012 at 05:50 PM Report Share #472183 Posted August 13, 2012 at 05:50 PM (edited) Olá prezados, Tenho estado a tentar utilizar a função 'mail' do php para enviar mensagens, de uma forma simples por enquanto, mas não recebo nada no email que coloco como destinaário. Recorrendo em alguns artigos na web, notei que precisaria de configurar antes a função 'mail' no arquivo 'php.ini' e que não tenho idéia de como fazê-lo, o que descomentar ou acrescentar, etc... O código simples encontra-se assim: <?php $para = 'amarildolucas@live.com'; $assunto = 'Teste'; $mensagem = 'Olá! Isto é um teste'; $headers = 'From: rasinc@live.com.pt' . "\r\n" . 'Reply-To: resinc@live.com.pt' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($para, $assunto, $mensagem, $headers); ?> Alguém que ajude?! Cumps. Edited August 14, 2012 at 11:57 AM by brunoais geshi! Link to comment Share on other sites More sharing options...
dash Posted August 13, 2012 at 07:15 PM Report Share #472190 Posted August 13, 2012 at 07:15 PM Usa o PHPMailer. Assim evitas perder tempo a configurar isso. Link to comment Share on other sites More sharing options...
beez Posted August 14, 2012 at 07:46 PM Author Report Share #472292 Posted August 14, 2012 at 07:46 PM Obrigado dash Fiz um pequeno estudo ontém, e consegui resolver o problema. Cumps. 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