antiblock
Cyphriun
  • Chatbox

    You don't have permission to chat.
    Load More
Sign in to follow this  
DANGER_URSOS

Phpmailer Ajuda

4 posts in this topic

Boas pessoal, eu uso 000webhost e tenho um host .com que adquiri na onlydomains.Eu criei um mail ([email protected]) no 000webhost mas este n da o smtp...

E n quero usar a mail function pq no mail recebido nem aparece que foi o [email protected] que mandou...

Há alguma maneira de arranjar um smtp server e mandar mails com o [email protected]?

 

Phpmailer

<?phprequire './PHPMailer-master/PHPMailerAutoload.php';$mail = new PHPMailer;$mail->isSMTP();                                      // Set mailer to use SMTP$mail->Host = '';  // Specify main and backup SMTP servers$mail->SMTPAuth = true;                               // Enable SMTP authentication$mail->Username = '[email protected]';                 // SMTP username$mail->Password = '********';                           // SMTP password$mail->SMTPSecure = 'tls';                            $mail->From = '[email protected]';$mail->FromName = 'Admin';$mail->addAddress('[email protected]');               // Name is optionalmail->WordWrap = 50;                                 // Set word wrap to 50 characters$mail->isHTML(true);                                  // Set email format to HTML$mail->Subject = 'swag';$mail->Body    = 'This is the HTML message body <b>in bold!</b>';$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';if(!$mail->send()) {echo 'Message could not be sent.';echo 'Mailer Error: ' . $mail->ErrorInfo;} else {echo 'Message has been sent';}?>

script:

Share this post


Link to post
Share on other sites
antiblock
Elveron

Isso não tens outra hipótese senão configurando um servidor SMTP para o domínio. A função mail vai ser detectada como spam não tens hipótese, principalmente vindo de um host free.

Share this post


Link to post
Share on other sites

Isso não tens outra hipótese senão configurando um servidor SMTP para o domínio. A função mail vai ser detectada como spam não tens hipótese, principalmente vindo de um host free.

E como é que eu configuro um server smtp po dominio???

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this