Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function try_to_send_notification() {
- $mail = new PHPMailer();
- $mail->IsSMTP();
- $mail->Host = "your.host.com";
- $mail->Port = 25;
- $mail->SMTPAuth = false;
- $mail->Username = "your_username";
- $mail->Password = "your_password";
- $mail->FromName = "Photo Gallery";
- $mail->From = "";
- $mail->AddAddress("", "Photo Gallery Admin");
- $mail->Subject = "New Photo Gallery Comment";
- $created = datetime_to_text($this->created);
- $mail->Body =<<<EMAILBODY
- A new comment has been received in the Photo Gallery.
- At {$created}, {$this->author} wrote:
- {$this->body}
- EMAILBODY;
- $result = $mail->Send();
- return $result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement