container = $container; } //end of setContainer /** * @return Container */ public function getContainer() { return $this->container; } //end of getContainer public function getPostVars() { return $this->postVars; } public function setPostVars($postVars) { $this->postVars = $postVars; } public function getToMails() { return $this->toMails; } public function setToMails($toMails) { $this->toMails = $toMails; } public function getAddress() { return $this->address; } public function setAddress($address) { $this->address = $address; } public function getContent() { return $this->content; } public function setContent($content) { $this->content = $content; } public function getSubject() { return $this->subject; } public function setSubject($subject) { $this->subject = $subject; } public function getAttachment() { return $this->attachment; } public function setAttachment($attachment) { $this->attachment = $attachment; } public function sendMail($echoMsg=0) { try { require_once 'class.phpmailer.php'; $mail = new PHPMailer(true); $body = file_get_contents($this->getAddress()); $mail->IsSMTP(); $mail->SMTPDebug = 0; $mail->SMTPAuth = true; $mail->SMTPSecure = "tls"; $mail->Host = "smtp.gmail.com"; $mail->Port = 587; $mail->Username = "tutyscakesmail@gmail.com"; $mail->Password = "Tutysmail10"; $mail->From = "info@tutyscakes.com"; $mail->FromName = "Tuty's Cakes"; $addresses = explode(',', $this->getToMails()); foreach ($addresses as $address) { $mail->AddAddress($address); } //$mail->AddAddress($this->getToMails()); $mail->Subject = $this->getSubject(); $mail->toMailStatic = $this->getToMails(); //$mail->AddBCC ("tuty@tutys.com"); //$mail->AddBCC ("mehmetbildiren@gmail.com"); $mail->WordWrap = 80; $mail->MsgHTML($body); $mail->IsHTML(true); $mail->Send(); if($echoMsg == 1) echo '
Mesajınız başarıyla gönderildi. Kısa zaman içinde geri dönüş yapılacaktır.
'; } catch (phpmailerException $e) { if($echoMsg == 1){ echo $e->errorMessage(); echo '
Mesaj Gönderilemedi.
'; } srand((double)microtime()*1000000); $marker = md5(uniqid(rand())); $message = $mail->Body; $toMail = $mail->toMailStatic; $headers = "From: Tuty's Cakes \n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-Type: multipart/mixed;\n"; $headers .= "\tboundary=\"___$marker==\""; $content ="--___$marker==\n"; $content .="Content-Type: text/html; charset=\"utf-8\"\n"; $content .="Content-Transfer-Encoding: 8bit\n"; $content .="\n$message\n"; mail($toMail,$mail->Subject,$content,$headers); /* $headers = "From: ithelpdesk@resourceinc.comcastbiz.net \n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-Type: multipart/mixed;\n"; $headers .= "\tboundary=\"___$marker==\""; $content ="--___$marker==\n"; $content .="Content-Type: text/plain; charset=\"utf-8\"\n"; $content .="Content-Transfer-Encoding: 8bit\n"; $content .="\nmessage mesaj\n"; //mail($to,$subject,$content,$headers); $adsad = mail("mehmetbildiren@gmail.com","mehmet",$content,$headers); */ } } } ?>
Fatal error: Uncaught Error: Class "mailTool" not found in /home/yarasa/domains/tutyscakes.com/public_html/_sys/container.php:25 Stack trace: #0 /home/yarasa/domains/tutyscakes.com/public_html/_sys/container.php(66): container->setClass() #1 /home/yarasa/domains/tutyscakes.com/public_html/service.php(19): container->loadClasses() #2 /home/yarasa/domains/tutyscakes.com/public_html/index.php(3): include('/home/yarasa/do...') #3 {main} thrown in /home/yarasa/domains/tutyscakes.com/public_html/_sys/container.php on line 25