fix(utils.email): 修复 email 组件中发件人无法正常获取的bug

This commit is contained in:
李东云
2022-10-31 17:09:17 +08:00
parent c942716d5f
commit f418341325

View File

@@ -48,7 +48,11 @@ class EmailService
string $subject = '', string $subject = '',
string $text = '' string $text = ''
): bool { ): bool {
$from = config('mailer_sender_name') . ' <' . config('mailer_sender') . '>'; $from = sprintf(
"%s <%s>",
config('common.third_party.email.mailer_sender_name'),
config('common.third_party.email.mailer_sender')
);
$email = (new Email()) $email = (new Email())
->from(Address::create($from)) ->from(Address::create($from))
->to($target) ->to($target)