Guest User

Untitled

a guest
Jun 19th, 2018
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. <?php # /system/applications/models/mailer.php
  2.  
  3. /*
  4. * @descr Send a validation email to a specified subscriber
  5. * @param Array Subscriber info
  6. * @retrn void
  7. */
  8. function send_validation ($subscriber)
  9. {
  10. // prepare the message
  11. $body = "Hi $subscriber->name, <br/><br/>"
  12. . 'Please click on the link to subscribe to our newsletter. '
  13. . 'If you cannot click on the link, copy the url and paste it on to the navigation bar of your browser: '
  14. . site_url('newsletter/validate/q1a2z3w4s5x6'.$subscriber->id);
  15.  
  16. // send an email message
  17. $this->email->from('noreply@joinparamount.com', 'No-Reply');
  18. $this->email->to($subscriber->email);
  19. $this->email->subject('Validate your e-mail address');
  20. $this->email->message($body);
  21. $this->email->send();
  22.  
  23. // prepare the view
  24. $data['title'] = 'An e-mail validation has been sent - JoinParamount.com';
  25. $data['message'] = 'An e-mail has been sent to the address you provided. Please click on the link provided inside to be verified.';
  26. $this->load->view('notification', $data);
  27. }
  28. ?>
Add Comment
Please, Sign In to add comment