Fixes for text emails

This commit is contained in:
David Bomba 2022-03-04 11:45:19 +11:00
parent 7afb9f9bb9
commit f718be63b1
10 changed files with 32 additions and 99 deletions

View File

@ -1 +1 @@
5.3.64
5.4.0

View File

@ -41,12 +41,17 @@ class NinjaMailer extends Mailable
$from_name = $this->mail_obj->from_name;
}
return $this->from(config('mail.from.address'), $from_name)
$ninja_mailable = $this->from(config('mail.from.address'), $from_name)
->subject($this->mail_obj->subject)
->view($this->mail_obj->markdown, $this->mail_obj->data)
->withSwiftMessage(function ($message) {
$message->getHeaders()->addTextHeader('Tag', $this->mail_obj->tag);
});
if(property_exists($this->mail_obj, 'text_view')){
$ninja_mailable->text($this->mail_obj->text_view, $this->mail_obj->data);
}
return $ninja_mailable;
}
}

View File

@ -63,7 +63,8 @@ class VerifyUserObject
$mail_obj->data = $data;
$mail_obj->markdown = 'email.admin.generic';
$mail_obj->tag = $this->company->company_key;
$mail_obj->text_view = 'email.admin.verify_user_text';
return $mail_obj;
}
}

View File

@ -40,6 +40,7 @@ class MigrationFailed extends Mailable
return $this
->from(config('mail.from.address'), config('mail.from.name'))
->text('email.migration.failed_text')
->view('email.migration.failed', [
'logo' => $this->company->present()->logo(),
'settings' => $this->company->settings,

View File

@ -64,7 +64,6 @@
"league/flysystem-aws-s3-v3": "~1.0",
"league/flysystem-cached-adapter": "^1.1",
"league/fractal": "^0.17.0",
"league/html-to-markdown": "^5.1",
"league/omnipay": "^3.1",
"livewire/livewire": "^2.6",
"mollie/mollie-api-php": "^2.36",

93
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "f3465f8b8e57efe3e6ca0ed04c49bff6",
"content-hash": "8ab74954c338fd80aa6597e93df6357f",
"packages": [
{
"name": "afosto/yaac",
@ -4905,95 +4905,6 @@
},
"time": "2017-06-12T11:04:56+00:00"
},
{
"name": "league/html-to-markdown",
"version": "5.1.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/html-to-markdown.git",
"reference": "e0fc8cf07bdabbcd3765341ecb50c34c271d64e1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/html-to-markdown/zipball/e0fc8cf07bdabbcd3765341ecb50c34c271d64e1",
"reference": "e0fc8cf07bdabbcd3765341ecb50c34c271d64e1",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-xml": "*",
"php": "^7.2.5 || ^8.0"
},
"require-dev": {
"mikehaertl/php-shellcommand": "^1.1.0",
"phpstan/phpstan": "^0.12.99",
"phpunit/phpunit": "^8.5 || ^9.2",
"scrutinizer/ocular": "^1.6",
"unleashedtech/php-coding-standard": "^2.7",
"vimeo/psalm": "^4.22"
},
"bin": [
"bin/html-to-markdown"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.2-dev"
}
},
"autoload": {
"psr-4": {
"League\\HTMLToMarkdown\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Colin O'Dell",
"email": "colinodell@gmail.com",
"homepage": "https://www.colinodell.com",
"role": "Lead Developer"
},
{
"name": "Nick Cernis",
"email": "nick@cern.is",
"homepage": "http://modernnerd.net",
"role": "Original Author"
}
],
"description": "An HTML-to-markdown conversion helper for PHP",
"homepage": "https://github.com/thephpleague/html-to-markdown",
"keywords": [
"html",
"markdown"
],
"support": {
"issues": "https://github.com/thephpleague/html-to-markdown/issues",
"source": "https://github.com/thephpleague/html-to-markdown/tree/5.1.0"
},
"funding": [
{
"url": "https://www.colinodell.com/sponsor",
"type": "custom"
},
{
"url": "https://www.paypal.me/colinpodell/10.00",
"type": "custom"
},
{
"url": "https://github.com/colinodell",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/league/html-to-markdown",
"type": "tidelift"
}
],
"time": "2022-03-02T17:24:08+00:00"
},
{
"name": "league/mime-type-detection",
"version": "1.9.0",
@ -15758,7 +15669,7 @@
"prefer-stable": true,
"prefer-lowest": false,
"platform": {
"php": "^7.4|^8",
"php": "^8.0",
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*"

View File

@ -14,8 +14,8 @@ return [
'require_https' => env('REQUIRE_HTTPS', true),
'app_url' => rtrim(env('APP_URL', ''), '/'),
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
'app_version' => '5.3.64',
'app_tag' => '5.3.64',
'app_version' => '5.4.0',
'app_tag' => '5.4.0',
'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', ''),

View File

@ -0,0 +1,5 @@
{!! $title !!}
{!! ctrans('texts.confirmation_message') !!}
{!! $url !!}

View File

@ -0,0 +1,11 @@
{!! ctrans('texts.migration_failed_label') !!}
{!! ctrans('texts.migration_failed') }} {{ $company->present()->name() !!}
@if(\App\Utils\Ninja::isSelfHost() || $is_system)
{!! $exception->getMessage() !!}
{!! $content !!}
@else
Please contact us at contact@invoiceninja.com for more information on this error.
@endif

View File

@ -44,4 +44,4 @@ Route::get('stripe/completed', 'StripeConnectController@completed')->name('strip
Route::get('checkout/3ds_redirect/{company_key}/{company_gateway_id}/{hash}', 'Gateways\Checkout3dsController@index')->middleware('domain_db')->name('checkout.3ds_redirect');
Route::get('mollie/3ds_redirect/{company_key}/{company_gateway_id}/{hash}', 'Gateways\Mollie3dsController@index')->middleware('domain_db')->name('mollie.3ds_redirect');
Route::get('gocardless/ibp_redirect/{company_key}/{company_gateway_id}/{hash}', 'Gateways\GoCardlessController@ibpRedirect')->middleware('domain_db')->name('gocardless.ibp_redirect');
Route::get('.well-known/apple-developer-merchantid-domain-association', 'ClientPortal\ApplePayDomainController@showAppleMerchantId');
Route::get('.well-known/apple-developer-merchantid-domain-association', 'ClientPortal\ApplePayDomainController@showAppleMerchantId');