Why I am sending email to myself ?

Posted 1 year ago by Webiondev123

I want a contact form for users to send me email


        Mail::send('email', ['title' => 'Complaint', 'content' => $request->complaint], function ($message)  use ($request)
        {

            $message->from($request->email, $request->name);
            $message->subject($request->subject);
            $message->to('[email protected]', 'myname');

        });

in mail.php

  'from' => [
        'address' => env('MAIL_FROM_ADDRESS', '[email protected]'),
        'name' => env('MAIL_FROM_NAME', 'mydomain'),
    ],

Even when I comment out the from in mail.php still it is only sending to myself.

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