title: Laravel class not found for mail
body: <p>I'm trying to generate a notification email to the webmaster when there's a new registration on the site I'm building. </p>
  
  <p>I have a mail class called SignedUp at App\Mail\SignedUp.php.</p>
  
  <p>In the Illuminate/Foundation/Auth/RegistersUser file, I have the following:</p>
  
  <pre><code>namespace Illuminate\Foundation\Auth;
  
  use App\Organization;
  use Illuminate\Http\Request;
  use Illuminate\Support\Facades\Auth;
  use Illuminate\Auth\Events\Registered;
  use App\Mail\SignedUp;
  
  trait RegistersUsers
  {
      use RedirectsUsers;
  
      /**
       * Show the application registration form.
       *
       * @return \Illuminate\Http\Response
       */
      public function showRegistrationForm()
      {
          $organizations = Organization::all();
  
          return view('auth.register', compact('organizations'));
      }
  
      /**
       * Handle a registration request for the application.
       *
       * @param  \Illuminate\Http\Request  $request
       * @return \Illuminate\Http\Response
       */
      public function register(Request $request)
      {
  
          $this-&gt;validator($request-&gt;all())-&gt;validate();
  
          event(new Registered($user = $this-&gt;create($request-&gt;all())));
  
          $this-&gt;guard()-&gt;login($user);
  
          Mail::to('example@example.com')-&gt;send(new SignedUp($user));        
  
          return $this-&gt;registered($request, $user)
                          ?: redirect($this-&gt;redirectPath());
      }
  </code></pre>
  
  <p>When I register a new user, I get this message:
  <strong>Class 'Illuminate\Foundation\Auth\Mail' not found</strong></p>
  
  <p>if I change <code>use App\Mail\SignedUp;</code> to <code>use App\Mail;</code>, the error is still: <strong>Class 'Illuminate\Foundation\Auth\Mail' not found</strong></p>
  
  <p><code>use Mail;</code> gives me <strong>Illuminate\Foundation\Auth\SignedUp' not found</strong></p>
  
  <p><code>use App\Mail\SignedUp;</code> gives me <strong>Class 'Illuminate\Foundation\Auth\Mail' not found</strong></p>
  
  <p>Not attempting to import the class at all, and instead changing my statement to: <code>\Mail::to('example@example.com')-&gt;send(new SignedUp($user));</code>, I get <strong>Class 'Illuminate\Foundation\Auth\SignedUp' not found</strong></p>
  
  <p>A cannot figure out how to get it to find my mail class.</p>
  
  <p>I'm just guessing and shooting in the dark - can anyone see what I'm doing wrong?</p>
  
  <p>Here is my mail class file:</p>
  
  <pre><code>&lt;?php
  
  namespace App\Mail;
  
  use Illuminate\Bus\Queueable;
  use Illuminate\Mail\Mailable;
  use Illuminate\Queue\SerializesModels;
  use Illuminate\Contracts\Queue\ShouldQueue;
  
  class SignedUp extends Mailable
  {
      use Queueable, SerializesModels;
  
      public $url = 'https://av-cuauhtemoc.org/users';
  
      public $user;
  
      /**
       * Create a new message instance.
       *
       * @return void
       */
      public function __construct()
      {
          //
      }
  
      /**
       * Build the message.
       *
       * @return $this
       */
      public function build()
      {
          return $this-&gt;from('example@example.com')-&gt;view('emails.new-registration');
      }
  }
  </code></pre>