Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
384
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. function sendmail($from, $fromname, $to, $subject, $body, $anexo1=false, $anexo2=false) {
  2.  
  3. require_once("mailer/class.phpmailer.php");
  4.  
  5. $mail = new PHPMailer();
  6.  
  7. $mail->SMTP_PORT = "587";
  8. $mail->IsSMTP =('smtp.futuraonline.com.br');
  9. $mail->Mailer =('mail');
  10. $mail->SMTPSecure ='ssl';
  11. $mail->SMTPAuth = true;
  12. $mail->Username = ('falecom@futuraonline.com.br');
  13. $mail->Password = ('futuradtvm');
  14. $mail->Sender = ('falecom@futuraonline.com.br');
  15. $mail->From = $from;
  16. $mail->FromName = $fromname;
  17. $mail->Addbcc ($to);
  18. //$mail->AddBcc("contato@futuraonline.com.br");
  19. $mail->Subject = ($subject);
  20. $mail->AddAttachment ($anexo1,$anexo2);
  21. $mail->IsHTML(true);
  22. $mail->Body = $body;
  23.  
  24. if(!$mail->Send())
  25. return false;
  26. else
  27. return true;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement