0
votes

I'm using laravel 5.2 mail to send emails like below :

if (App::environment('production')) {
    Mail::send('emails.inquiry', ['user' => $user], function ($message) use ($user) {
    $message->from('info@test.com', 'tech Support');
    $message->to($user->email, $user->fullname)->subject(Tickets::ADFB_TITLE);
    });
}

Problem is when I recieve emails from project they are : [Message clipped] inside my gmail.

this is strange because when I'm testing laravel reset password to send reset password link to my email address, it works perfectly and loads html view without any problem while above code does not, and in my gmail account I get [Message clipped].

This is my email view blade :

@extends('layouts.app')

@section('content')
    <div class="container page-forgot-password">
        <div class="row">
            <div class="col-md-4 col-md-offset-4">
                <div class="panel panel-default">
                    <div class="panel-heading text-bold">test template</div>

                    <div class="panel-body">
                        <p>
                            <span>hellow</span>
                        </p>

                        <div class="alert alert-success">
                            your request is in progress.
                        </div>

                        <span class="help-block"></span>

                        <span class="help-block">
                                      Please inform us of any new request.
                        </span>
                    </div>
                </div> <!-- /.panel.panel-default -->
            </div>
        </div>
    </div>
@endsection

Any idea?

1
Gmail considers any emails with an HTML file size over 102 Kb to be too long. So it clips it and displays the message below at the cut-off point. Are you iterating some result in mail?Rohan Shewale
@RohanShewale then why reset pass email body is displaying without any problem ? it's size is bigger than the one i'm trying to send as you can see the view above.Mohammad_Hosseini

1 Answers

0
votes

The problem was due to extending 'layouts.app', I've changed the email body to plain html/text and it worked.

in each email body template you can put your codes and styles but it should be plain text, and also you can use laravel blade template engine also.