Skip to content

Commit

Permalink
email
Browse files Browse the repository at this point in the history
  • Loading branch information
pavlosb committed Jun 28, 2024
1 parent fd2a399 commit 7c40bc0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
17 changes: 17 additions & 0 deletions application/config/email.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

$smtpass = getenv("SMTPPASS");
$config['protocol'] = 'smtp';
$config['wordwrap'] = TRUE;
$config['mailtype'] = 'html';
$config['charset'] = 'utf-8';
$config['crlf'] = '\r\n';
$config['newline'] = '\r\n';
$config['smtp_host'] = 'smtp.sendgrid.net';
$config['smtp_user'] = 'apikey';
$config['smtp_pass'] = $smtpass;
$config['smtp_crypto'] = 'TLS';
$config['smtp_port'] = '587';
$config['smtp_timeout'] = '15';

21 changes: 2 additions & 19 deletions application/controllers/Inspection.php
Original file line number Diff line number Diff line change
Expand Up @@ -1076,26 +1076,9 @@ private function _checksignature($inspid) {

}

public function emailsend() {




public function emailsend($inspid=null) {
$this->load->library('email');
$smtpass = getenv("SMTPPASS");
$config['protocol'] = 'smtp';
$config['wordwrap'] = TRUE;
$config['mailtype'] = 'html';
$config['charset'] = 'utf-8';
$config['crlf'] = '\r\n';
$config['newline'] = '\r\n';
$config['smtp_host'] = 'smtp.sendgrid.net';
$config['smtp_user'] = 'apikey';
$config['smtp_pass'] = $smtpass;
$config['smtp_crypto'] = 'TLS';
$config['smtp_port'] = '587';
$config['smtp_timeout'] = '15';
$this->email->initialize($config);

$this->email->to('[email protected]');
$this->email->from('[email protected]', 'IMPERIAL-DEKRA');
$this->email->cc('[email protected]');
Expand Down

0 comments on commit 7c40bc0

Please sign in to comment.