Monday, May 22, 2017

Sending domain emails from laravel application [duplicate]

This question already has an answer here:

I am developing an application for users to submit reports which have to be reviewed by the CEO of the company. I am using Laravel 5 and i have configured it to send email when a new report is submitted.I have configured the application using the mail.php file in the configuration file. It is doing fine and sending emails with all other email such as gmail and yahoo.But with emails like example@example.com does not work. Any idea what is to be done is much appreciated.

Here is what i have tried to do

$hod_info = Employee::where('sub_department_id','=',$logged_in_employee-‌​>sub_department_id)-‌​>where('employee_typ‌​e','=','hod')->first‌​();

$ceo = Employee::where('employee_type','=','ceo')->first(); 
$employee = Employee::find(Auth::user()->id);
 //send email 
$mail = Mail::send('emails.new_report_email_notification', array('ceo_name'=>$hod_info->employee_name,'employee_name'=>‌​$logged_in_employee-‌​>employee_name), function($message){ $message->to(Input::get('email'))->subject('Pending report review!'); });

 if($mail){`enter code here`
 return redirect();
 }else{
 return redirect();
 } 

Thanks in advance



via Alluma

Advertisement