Error on sending mail, fwrite(): SSL: An existing connection was forcibly closed by the remote host.

Posted 2 months ago by Jaikangam

what will be the reason for this.

my controller

 public function store_contact( Request $request){
            'name'=> 'required',
            'email'=> 'required|email',
            'interested'=> 'required',
            'organization_type'=> 'required',
            'organization_name'=> 'required',
            'organization_type'=> 'required',
            'location'=> 'required',
            'message'=> 'required',

    $data = array(
            'name'=> $request->name,
            'email' => $request->email,

    DB::table ('contacts')->insert ($data);

      Mail::send('', $data, function($message) use ($data)
        $message->from($data['email'], $data['name'] );
        $message->to('[email protected]','Nishtha Chouhan');
        $message->subject('New Contact Enquiry');

    return back();

Please sign in or create an account to participate in this conversation.