0
I have the following e-mail class
class EmailEnviarDao {
public function __construct() {}
public function enviaEmail($email) {
$cabecalhos = 'MIME-Version: 1.0' . "\r\n";
$cabecalhos .= 'Content-type: text/html; charset=utf-8' . "\r\n";
$cabecalhos .= 'To: '.$email->getNomeAlvo().' <'.$email->getEmailAlvo().'>' . "\r\n";
$cabecalhos .= 'From: '.$email->getNomeRemete().' <'.$email->getEmailRemete().'>' . "\r\n";
print "<pre>";
//print_r($email)."<br><br><br><br>";
print $email->getEmailAlvo()."<br>";
print $email->getAssunto()."<br>";
print $email->getMensagem()."<br>";
print $cabecalhos;
print "</pre>";
if(@mail($email->getEmailAlvo(), $email->getAssunto(), $email->getMensagem(), $cabecalhos)) {
return array('success'=>'1','errors'=>'0K');
} else {
return array('success'=>'0','errors'=>"Não conseguimos enviar o e-mail");
}
}
}
$email
, is a objeto
which has already been tested in OK
.
prints within the class print
[email protected]
Re: Quero Comprar
Email enviado pelo site da Hotplate Prensas
Nome: Eu
Telefone: 3333333333
E-mail: [email protected]
Intersse: Quero Comprar
Descrição:
teste 1
MIME-Version: 1.0
Content-type: text/html; charset=utf-8
To: Hotplate Prensas
From: Eu
I use the UOL Host hosting and the email will not go at all.
Some guidance?
change
@mail
formail
and see if any error messages appear on the page or logs.– Ricardo Moraleida
does not return any error, just does not send, although the reply is that sent but neither in the span box arrives the message
– Carlos Rocha
See your hosting provider’s manual and support service. Each provider has its own usage policies. Usually require authenticated email sending and you can find this in the provider’s manuals.
– Daniel Omine