Category : email-attachments

The project I’m working on would ideally scan every delivered email to "[email protected]" then forward every email to gmail. If there is attachment with particular extension it would be extracted and stored on my app’s server for further examination. From my research I could use Google developer API https://developers.google.com/gmail/api/reference/rest/v1/users.messages.attachments/get#examples With this official library https://github.com/googleapis/google-api-php-client Or ..

Read more

Don’t know what’s wrong in my code , sending email is working without file attachement here is the code in the controller public function store(Request $request){ $candidature=new Candidature; $candidature->user_id=Auth::user()->id; $candidature->offre_id=$request->id; $candidature->save(); $offre=Offre::where(‘id’,$candidature->offre_id)->get(); $user=User::where(‘id’,$offre[0]->user_id)->get(); $experiences=Experience::where(‘user_id’,’=’,Auth::user()->id)->get(); $newcandidature= [ ‘offrs’ => $offre[0]->intitule, ‘temps’=> $candidature->created_at, ‘candidat’=> Auth::user()->name ]; view()->share(‘experiences’,$experiences); $pdf = PDF::loadView(‘cv_pdf’, $experiences); Mail::to($user[0]->email) ->send(new Notif_candidature($newcandidature)) ->attachData($pdf,’file.pdf’); return response()->json(array(‘success’ ..

Read more