Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use PHPMailer;
- $mail = new PHPMailer;
- $mail->isSMTP();
- $mail->SMTPAuth = true;
- $mail->SMTPDebug = 1;
- $mail->Host = 'smtp.uhsevico.com';
- $mail->SMTPAuth = true;
- $mail->Username = "adm@mydomain.com.br";
- $mail->Password = "mypassoword";
- //$mail->SMTPSecure = 'tls';
- $mail->Port = 587;
- $mail->setFrom('sender@mydomain.com.br', 'contato imotur');
- mail->addAddress('receiver@yahoo.com', 'Diego Alves');
- $mail->Subject = 'Here is the subject';
- $mail->Body = "ImoTur no contato das atividades";
- //$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';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement