updates
This commit is contained in:
@@ -51,15 +51,13 @@ class PhpMailController extends Controller
|
||||
public function mailfrom($reg, $dept_id)
|
||||
{
|
||||
$email_id = '';
|
||||
$emails = Emails::where('department', '=', $dept_id)->first();
|
||||
|
||||
$dept_mail = Department::select('outgoing_email')->where('id', '=', $dept_id)->first();
|
||||
$email = Email::find(1);
|
||||
if ($emails && $emails->sending_status) {
|
||||
$email_id = $emails->id;
|
||||
if ($dept_mail && $dept_mail->outgoing_email != '') {
|
||||
$email_id = $dept_mail->outgoing_email;
|
||||
} else {
|
||||
$email_id = $email->sys_email;
|
||||
}
|
||||
|
||||
return $email_id;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user