Laravel 4 Mail not passing data

后端 未结 2 1870
北恋
北恋 2021-01-22 13:45

Emails works fine with dummy data:

    Mail::send(\'emails.contact\', $messageData, function ($message) use ($messageData) {
        $message->from(\'joetanno         


        
2条回答
  •  误落风尘
    2021-01-22 14:38

    $data = array( 'email' => 'sample@sample.com', 'first_name' => 'Lar', 'from' => 'sample@sample.comt', 'from_name' => 'Vel' );
    
    Mail::send( 'email.welcome', $data, function( $message ) use ($data)
    {
        $message->to( $data['email'] )->from( $data['from'], $data['first_name'] )->subject( 'Welcome!' );
    });
    

提交回复
热议问题