Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /* SMTP Options */
- $this->Email->smtpOptions = array(
- 'port'=>'465',
- 'timeout'=>'30',
- 'host' => 'ssl://smtp.gmail.com',
- 'username'=>'me@gmail.com',
- 'password'=>'password',
- 'client'=>"helo gmail.com"
- );
- /* Set delivery method */
- $this->Email->delivery = 'smtp';
- $this->Email->from = "<me@gmail.com>";
- $this->Email->to = "<you@gmail.com>";
- $this->Email->subject = "Subject";
- $this->Email->sendAs = 'html';
- if (!$this->Email->send($_GET['message'])){
- $this->set('smtp_errors', $this->Email->smtpError);
- echo "fail ";
- debug($this->Email->smtpError);
- exit;
- }else{
- echo "success";
- exit;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement