Try to use this version more complete and check if it resolves. Whenever I use the form I posted below, all servers receive quietly.
<?php
$subject = 'Assunto';
$from = '[email protected]';
$to = '[email protected]';
$bcc = null; // Esconder endereços de e-mails.
$cc = null; // Qualquer destinatário pode ver os endereços de e-mail especificados nos campos To e Cc.
$message = 'Corpo da mensagem';
$headers = sprintf( 'Date: %s%s', date( "D, d M Y H:i:s O" ), PHP_EOL );
$headers .= sprintf( 'Return-Path: %s%s', $from, PHP_EOL );
$headers .= sprintf( 'To: %s%s', $to, PHP_EOL );
$headers .= sprintf( 'Cc: %s%s', $cc, PHP_EOL );
$headers .= sprintf( 'Bcc: %s%s', $bcc, PHP_EOL );
$headers .= sprintf( 'From: %s%s', $from, PHP_EOL );
$headers .= sprintf( 'Reply-To: %s%s', $from, PHP_EOL );
$headers .= sprintf( 'Message-ID: <%s@%s>%s', md5( uniqid( rand( ), true ) ), $_SERVER[ 'HTTP_HOST' ], PHP_EOL );
$headers .= sprintf( 'X-Priority: %d%s', 3, PHP_EOL );
$headers .= sprintf( 'X-Mailer: PHP/%s%s', phpversion( ), PHP_EOL );
$headers .= sprintf( 'Disposition-Notification-To: %s%s', $from, PHP_EOL );
$headers .= sprintf( 'MIME-Version: 1.0%s', PHP_EOL );
$headers .= sprintf( 'Content-Transfer-Encoding: 8bit%s', PHP_EOL );
$headers .= sprintf( 'Content-Type: text/html; charset="iso-8859-1"%s', PHP_EOL );
mail( null, $subject, $message, $headers );
?>
How do you know the email was sent? by
echo
?– rray
Ever tried using Phpmailer or Swiftmailer? These are libraries where you set up an email account and use it to send.
– Rafael Mena Barreto
@rray I don’t know that was just for me to know if php was running
– Amadeu Antunes