@jimmck @lindstrom @bashy
First of all thank you all for helping out in such a generous way. I apologise that this has taken as long as it has.
I have done some rudimentary testing, and I believe that the source of my problem is that L5 is just not reading my config/mail.php file. Why ??
- Because if I do a dd('hello') at the top of the mail file it does not render it.
- If I omit my controller and place Mail::send() in a Route with a closure I get the same error message as when I place it in a controller, namely:
Test Route:
Route::get('mail', function () {
Mail::send('emails.new_contractor', [ ], function($message){
$message->to('vincej1657@gmail.com')->subject('Test Email');
});
});
Resulting error message:
Swift_TransportException in AbstractSmtpTransport.php line 162: Cannot send message without a sender address
Ie it is not reading the sender value from mail.php
If I add to my closure the following line, I eliminate the sender error message:
$message->sender('vincej1657@gmail.com');
However, the inclusion of this statement simply creates the old favorite error message telling me that L5 / Swift does not have a password. That is to say, it is not reading the mail.php file where my pw is:
Expected response code 250 but got code "530", with message "530 5.7.1 Authentication required
My conclusion is that somewhere, somehow L5 is not reading the mail.php file with or without .env constants
Any ideas what might be causing this ? As I have said before, I recently upgraded from 4.2 to 5.1
As always many thanks !