升级到Laravel 9后,我的应用程序发送的所有电子邮件都包含Gmail (以及雅虎邮件)中的坏链接(而不是正确的链接)。基本上,我的电子邮件视图中的href属性的值被一个坏掉的链接所取代:
https://email.mail.mydomain.io/c/eJxNjksKwyAURVejsxY_-ZiBg0DJAroDfe-ZWJIYjC1093VSWrijw7mXi9ZJcjxa8OD7VptBUStV32NwEgVqYzqgBgNrRMkOV8rXmPhifQAUCrAbTOeVwSYEGVpQyvsKheerXUo5TqZHpqaab_u3UuEcX3TJBGneY4lpr_p0PrfN5TfTtzsBVQF5tg93HpT_TkD6AIjKPZE
这是我的电子邮件视图:
@extends('layouts.mail')
@section('title')
{{ $subject }}
@endsection
@section('body')
<img src="{{ tenant_config('logo_path') ?? global_asset("/img/logo/logo.png") }}" alt="{{ tenant_config('company_name') }}" class="logo" style="display:block;max-width:300px;margin-top:.5rem;margin-bottom:30px;margin-right:auto;margin-left:auto;" >
<h1 class="text--blue" style="text-align:center;margin-top:0;margin-bottom:1rem;margin-right:0;margin-left:0;font-size:2.4rem;color:#3bafbf;" >
+{{ $hit->reward }}<span class="text--pts">{{ __('global.pts') }}</span>
</h1>
<p style="text-align:center;margin-top:0;margin-bottom:1rem;margin-right:0;margin-left:0;" >
{{ __('mails/notification.there_is_time', ['name' => $hit->user->firstname]) }}
</p>
<p style="text-align:center;margin-top:0;margin-bottom:1rem;margin-right:0;margin-left:0;" >
{{ __('mails/notification.dont_reply') }}
</p>
<p style="text-align:center;margin-top:0;margin-bottom:1rem;margin-right:0;margin-left:0;" >
<a href="{{ $actionUrl }}" class="button" style="background-color:#3bafbf;text-decoration:none;color:#ffffff;padding-top:.75rem;padding-bottom:.75rem;padding-right:1.5rem;padding-left:1.5rem;transition:box-shadow 150ms ease-in-out;display:inline-block;margin-top:5px;border-radius:4px;box-shadow:0 3px 6px rgba(0, 0, 0, 0.1);font-size:1.5rem;" >{{ __('mails/global.visit_my_profile') }}</a><br>
</p>
@endsection怎么解决这个问题呢?我也一直在使用archtechx/tenancy包进行多租户.
发布于 2022-07-18 14:41:15
我找到了解决办法。我的电子邮件服务提供商(邮箱)正在取代我的电子邮件链接跟踪链接,以跟踪点击。我只需在邮件中设置从http到https的跟踪协议,就可以修复它了。
https://stackoverflow.com/questions/73023712
复制相似问题