laravel beautymail

Published 9 months ago by salomon022

please help me "message": "Class App\Http\Controllers\Snowfire\Beautymail\Beautymail does not exist", "file"

Best Answer (As Selected By salomon022)
sutherland

It looks like the package is not compatible with 5.5. File an issue on their Github page letting them know.

The contract Beautymailer is implementing changed in 5.5, so they need to implement 2 new methods as described in the error you mentioned earlier.

sutherland

I believe your formatting is broken, but you should probably be importing the class at the top of your controller file. Add use Snowfire\Beautymail\Beautymail; to the top of your controller then just reference Beautymail instead of the full class name.

Dry7
Dry7
9 months ago (151,680 XP)

@salomon022 add in header

use Snowfire\Beautymail\Beautymail;
salomon022

namespace App\Http\Controllers;

use Illuminate\Http\Request;

use Illuminate\Support\Facades\Mail;

use Snowfire\Beautymail\Beautymail;

class mailController extends Controller {

public static function sendMail($url)

{

      $title = "password Reset";

        $content = $url;

        $data = array('button' => $content);

$beautymail = app()->make(Snowfire\Beautymail\Beautymail::class);

$beautymail->send('email.email', $data, function($message) use($data)

{

    $message
        ->from('[email protected]')
        ->to('pasupathi022@gmail.com', 'John Smith')
        ->subject('Welcome!');

});

    $I =1;

    RETURN $I;
}   

}

but not working

sutherland

Change

$beautymail = app()->make(Snowfire\Beautymail\Beautymail::class);

to

$beautymail = app()->make(Beautymail::class);
salomon022

next error

{ "message": "Class Snowfire\Beautymail\Beautymail contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (Illuminate\Contracts\Mail\Mailer::to, Illuminate\Contracts\Mail\Mailer::bcc)", "file": "C:\xampp\htdocs\admin\vendor\snowfire\beautymail\src\Snowfire\Beautymail\Beautymail.php", "line": 7, "trace": [] }

sutherland

Are you sure you've followed the full directions for installing Beautymail? https://github.com/Snowfire/Beautymail#installation

salomon022

C:\xampp\htdocs\admin>composer require snowfire/beautymail dev-master ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Nothing to install or update Package illuminate/html is abandoned, you should avoid using it. Use laravelcoll ective/html instead. Generating optimized autoload files

Illuminate\Foundation\ComposerScripts::postAutoloadDump @php artisan package:discover Discovered Package: fideloper/proxy Discovered Package: laravel/tinker Package manifest generated successfully.

salomon022

app .php

'providers' => [

  

Illuminate\Auth\AuthServiceProvider::class,

    Illuminate\Broadcasting\BroadcastServiceProvider::class,

    Illuminate\Bus\BusServiceProvider::class,

    Illuminate\Cache\CacheServiceProvider::class,

    Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,

    Illuminate\Cookie\CookieServiceProvider::class,

    Illuminate\Database\DatabaseServiceProvider::class,

    Illuminate\Encryption\EncryptionServiceProvider::class,

    Illuminate\Filesystem\FilesystemServiceProvider::class,

    Illuminate\Foundation\Providers\FoundationServiceProvider::class,

    Illuminate\Hashing\HashServiceProvider::class,

    Illuminate\Mail\MailServiceProvider::class,

    Illuminate\Notifications\NotificationServiceProvider::class,

    Illuminate\Pagination\PaginationServiceProvider::class,

    Illuminate\Pipeline\PipelineServiceProvider::class,

    Illuminate\Queue\QueueServiceProvider::class,

    Illuminate\Redis\RedisServiceProvider::class,

    Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,

    Illuminate\Session\SessionServiceProvider::class,

    Illuminate\Translation\TranslationServiceProvider::class,

    Illuminate\Validation\ValidationServiceProvider::class,

    Illuminate\View\ViewServiceProvider::class,

    
    App\Providers\AppServiceProvider::class,
 

App\Providers\AuthServiceProvider::class,

    // App\Providers\BroadcastServiceProvider::class,
    

App\Providers\EventServiceProvider::class,

    App\Providers\RouteServiceProvider::class,

    Snowfire\Beautymail\BeautymailServiceProvider::class,

],
salomon022

Publishing :

C:\xampp\htdocs\admin>php artisan vendor:publish --provider="Snowfire\Beautymail \BeautymailServiceProvider"

Copied Directory [\vendor\snowfire\beautymail\public] To [\public\vendor\beautym ail]

Publishing complete.

salomon022

but not working

sutherland

What version of Laravel are you on?

salomon022

laravel 5.5

sutherland

It looks like the package is not compatible with 5.5. File an issue on their Github page letting them know.

The contract Beautymailer is implementing changed in 5.5, so they need to implement 2 new methods as described in the error you mentioned earlier.

salomon022

github is not replay

salomon022

any other mail plugin laravel 5.5?

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