۱۰ پویا پارسایی
اعمال نشدن فونت در ایمیل
جامعه لاراول ایجاد شده در ۲۶ اردیبهشت ۱۴۰۱

سلام و عرض ادب، فونت رو توی layout ایمیل میذارم:

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vazir-font/30.1.0/font-face.min.css">

توی default.css هم قرارش میدم:

body,
body *:not(html):not(style):not(br):not(tr):not(code) {
    box-sizing: border-box;
    font-family: Vazir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif,
        'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
    position: relative;
    direction: rtl;
}

توی خود برنامه که تستش میکنم مشکلی نداره و فونت رو میشناسه:

Route::get('/test',function(){
    return (new MailMessage)
        ->subject(Lang::get('Verify Email Address'))
        ->line(Lang::get('Please click the button below to verify your email address.'))
        ->action(Lang::get('Verify Email Address'), 'http://google.com')
        ->line(Lang::get('If you did not create an account, no further action is required.'));
});

ولی توی ایمیل که ارسال میشه، اعمال نمیشه.

ممنون میشم این سوال رو پاسخ بدید.

پویا پارسایی ۳۱ اردیبهشت ۱۴۰۱، ۰۵:۳۱

سلام دوست عزیز

پوزش بابت تاخیر در پاسخگویی

من یکم سرچ کردم براتون گویا هر فونتی رو نمیشه توی ایمیل استفاده کرد

باز خودتون هم سرچ کنید نتایج رو میبینید

محمد گازری ۳۱ اردیبهشت ۱۴۰۱، ۰۸:۲۳

خواهش میکنم، ولی من از همین فونتی که استاد توی سورس جلسه گذاشتند استفاده کردم.

توی ویدئو اعمال شد، ولی من که میزنم اعمال نمیشه




پویا پارسایی ۳۱ اردیبهشت ۱۴۰۱، ۰۹:۰۸

توی mailtrap بررسی کردی؟

محمد گازری ۳۱ اردیبهشت ۱۴۰۱، ۰۹:۵۴

بله

پویا پارسایی ۳۱ اردیبهشت ۱۴۰۱، ۱۰:۰۰

الان فونت اعمال نمیشه یا تگ css نمیخوره؟

محمد گازری ۳۱ اردیبهشت ۱۴۰۱، ۱۰:۰۱

تگ css مشکلی نداره، فونت اعمال نمیشه

این source ایمیلم توی mailtrap:

html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
	<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta name="color-scheme" content="light">
	<meta name="supported-color-schemes" content="light">
	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vazir-font/30.1.0/font-face.min.css">
	<style>
	@media only screen and (max-width: 600px) {
	.inner-body {
	width: 100% !important;
	}
	.footer {
	width: 100% !important;
	}
	}
	@media only screen and (max-width: 500px) {
	.button {
	width: 100% !important;
	}
	}
	style>
	head>
	<body style="box-sizing: border-box; font-family: Vazir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; position: relative; direction: rtl; -webkit-text-size-adjust: none; background-color: #ffffff; color: #718096; height: 100%; line-height: 1.4; margin: 0; padding: 0; width: 100% !important;">
	<table class="wrapper" width="100%" cellpadding="0" cellspacing="0" role="presentation" style="box-sizing: border-box; font-family: Vazir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; position: relative; direction: rtl; -premailer-cellpadding: 0; -premailer-cellspacing: 0; -premailer-width: 100%; background-color: #edf2f7; margin: 0; padding: 0; width: 100%;">
	<tr>
	<td align="center" style="box-sizing: border-box; font-family: Vazir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; position: relative; direction: rtl;">
	<table class="content" width="100%" cellpadding="0" cellspacing="0" role="presentation" style="box-sizing: border-box; font-family: Vazir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; position: relative; direction: rtl; -premailer-cellpadding: 0; -premailer-cellspacing: 0; -premailer-width: 100%; margin: 0; padding: 0; width: 100%;">
	<tr>
	<td class="header" style="box-sizing: border-box; font-family: Vazir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; position: relative; direction: rtl; padding: 25px 0; text-align: center;">
	<a target="_blank" rel="noopener noreferrer" href="http://video-share.test" style="box-sizing: border-box; font-family: Vazir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; position: relative; direction: rtl; color: #3d4852; font-size: 19px; font-weight: bold; text-decoration: none; display: inline-block;">
	<img src="https://laravel.com/img/notification-logo.png" class="logo" alt="Laravel Logo" style="box-sizing: border-box; font-family: Vazir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; position: relative; direction: rtl; max-width: 100%; border: none; height: 75px; max-height: 75px; width: 75px;">
	a>
	td>
	tr>
	
	<tr>
	<td class="body" width="100%" cellpadding="0" cellspacing="0" style="box-sizing: border-box; font-family: Vazir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; position: relative; direction: rtl; -premailer-cellpadding: 0; -premailer-cellspacing: 0; -premailer-width: 100%; background-color: #edf2f7; border-bottom: 1px solid #edf2f7; border-top: 1px solid #edf2f7; margin: 0; padding: 0; width: 100%;">
	<table class="inner-body" align="center" width="570" cellpadding="0" cellspacing="0" role="presentation" style="box-sizing: border-box; font-family: Vazir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; position: relative; direction: rtl; -premailer-cellpadding: 0; -premailer-cellspacing: 0; -premailer-width: 570px; background-color: #ffffff; border-color: #e8e5ef; border-radius: 2px; border-width: 1px; box-shadow: 0 2px 0 rgba(0, 0, 150, 0.025), 2px 4px 0 rgba(0, 0, 150, 0.015); margin: 0 auto; padding: 0; width: 570px;">
	
	<tr>
	<td class="content-cell" style="box-sizing: border-box; font-family: Vazir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; position: relative; direction: rtl; max-width: 100vw; padding: 32px;">
	<h1 style="box-sizing: border-box; font-family: Vazir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; position: relative; direction: rtl; color: #3d4852; font-size: 18px; font-weight: bold; margin-top: 0; text-align: right;">سلام!h1>
	<p style="box-sizing: border-box; font-family: Vazir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; position: relative; direction: rtl; font-size: 16px; line-height: 1.5em; margin-top: 0; text-align: right;">برای تایید آدرس ایمیل روی دکمه زیر کلیک کنید.p>
	<p style="box-sizing: border-box; font-family: Vazir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; position: relative; direction: rtl; font-size: 16px; line-height: 1.5em; margin-top: 0; text-align: right;"><a target="_blank" rel="noopener noreferrer" href="http://google.com" class="button button-primary" target="_blank" rel="noopener" style="box-sizing: border-box; font-family: Vazir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; position: relative; direction: rtl; -webkit-text-size-adjust: none; border-radius: 4px; color: #fff; display: inline-block; overflow: hidden; text-decoration: none; background-color: #2d3748; border-bottom: 8px solid #2d3748; border-left: 18px solid #2d3748; border-right: 18px solid #2d3748; border-top: 8px solid #2d3748;">تایید آدرس ایمیلa>p>
	<p style="box-sizing: border-box; font-family: Vazir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; position: relative; direction: rtl; font-size: 16px; line-height: 1.5em; margin-top: 0; text-align: right;">چنانچه شما این اشتراک را ایجاد نکرده اید، نیاز به اقدام خاصی نیست.p>
	<p style="box-sizing: border-box; font-family: Vazir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; position: relative; direction: rtl; font-size: 16px; line-height: 1.5em; margin-top: 0; text-align: right;">با احترام,<br>
	Laravelp>
	<table class="subcopy" width="100%" cellpadding="0" cellspacing="0" role="presentation" style="box-sizing: border-box; font-family: Vazir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; position: relative; direction: rtl; border-top: 1px solid #e8e5ef; margin-top: 25px; padding-top: 25px;">
	<tr>
	<td style="box-sizing: border-box; font-family: Vazir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; position: relative; direction: rtl;">
	<p style="box-sizing: border-box; font-family: Vazir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; position: relative; direction: rtl; line-height: 1.5em; margin-top: 0; text-align: right; font-size: 14px;">If you're having trouble clicking the "تایید آدرس ایمیل" button, copy and paste the URL below
	into your web browser: <span class="break-all" style="box-sizing: border-box; font-family: Vazir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; position: relative; direction: rtl; word-break: break-all;"><a target="_blank" rel="noopener noreferrer" href="http://google.com" style="box-sizing: border-box; font-family: Vazir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; position: relative; direction: rtl; color: #3869d4;">http://google.coma>span>p>
	td>
	tr>
	table>
	td>
	tr>
	table>
	td>
	tr>
	<tr>
	<td style="box-sizing: border-box; font-family: Vazir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; position: relative; direction: rtl;">
	<table class="footer" align="center" width="570" cellpadding="0" cellspacing="0" role="presentation" style="box-sizing: border-box; font-family: Vazir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; position: relative; direction: rtl; -premailer-cellpadding: 0; -premailer-cellspacing: 0; -premailer-width: 570px; margin: 0 auto; padding: 0; text-align: center; width: 570px;">
	<tr>
	<td class="content-cell" align="center" style="box-sizing: border-box; font-family: Vazir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; position: relative; direction: rtl; max-width: 100vw; padding: 32px;">
	<p style="box-sizing: border-box; font-family: Vazir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; position: relative; direction: rtl; line-height: 1.5em; margin-top: 0; color: #b0adc5; font-size: 12px; text-align: center;">© 2022 Laravel. کلیه حقوق محفوظ است.p>
	td>
	tr>
	table>
	td>
	tr>
	table>
	td>
	tr>
	table>
	body>
	html>


روی لینک cdn فونت هم که میزنم باز میشه و لود شده، این لینک:

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vazir-font/30.1.0/font-face.min.css">

وقتی این لینک رو باز میکنم هم کدهای مربوط به فونت رو نمایش میده:

@font-face{font-family:Vazir;src:url(Vazir-Regular.eot);src:url(Vazir-Regular.eot?#iefix) format('embedded-opentype'),url(Vazir-Regular.woff2) format('woff2'),url(Vazir-Regular.woff) format('woff'),url(Vazir-Regular.ttf) format('truetype');font-weight:400;font-display:swap}@font-face{font-family:Vazir;src:url(Vazir-Bold.eot);src:url(Vazir-Bold.eot?#iefix) format('embedded-opentype'),url(Vazir-Bold.woff2) format('woff2'),url(Vazir-Bold.woff) format('woff'),url(Vazir-Bold.ttf) format('truetype');font-weight:700;font-display:swap}@font-face{font-family:Vazir;src:url(Vazir-Thin.eot);src:url(Vazir-Thin.eot?#iefix) format('embedded-opentype'),url(Vazir-Thin.woff2) format('woff2'),url(Vazir-Thin.woff) format('woff'),url(Vazir-Thin.ttf) format('truetype');font-weight:100;font-display:swap}@font-face{font-family:Vazir;src:url(Vazir-Light.eot);src:url(Vazir-Light.eot?#iefix) format('embedded-opentype'),url(Vazir-Light.woff2) format('woff2'),url(Vazir-Light.woff) format('woff'),url(Vazir-Light.ttf) format('truetype');font-weight:300;font-display:swap}@font-face{font-family:Vazir;src:url(Vazir-Medium.eot);src:url(Vazir-Medium.eot?#iefix) format('embedded-opentype'),url(Vazir-Medium.woff2) format('woff2'),url(Vazir-Medium.woff) format('woff'),url(Vazir-Medium.ttf) format('truetype');font-weight:500;font-display:swap}@font-face{font-family:Vazir;src:url(Vazir-Black.eot);src:url(Vazir-Black.eot?#iefix) format('embedded-opentype'),url(Vazir-Black.woff2) format('woff2'),url(Vazir-Black.woff) format('woff'),url(Vazir-Black.ttf) format('truetype');font-weight:900;font-display:swap}


پویا پارسایی ۳۱ اردیبهشت ۱۴۰۱، ۱۰:۲۴

پس بی زحمت پروژت رو توی گیتهاب پوش کن و لینکش رو برام بفرست

محمد گازری ۳۱ اردیبهشت ۱۴۰۱، ۱۰:۲۶

بفرمایین:

https://github.com/pouya-parsaei/video-share

این روتش هست:

Route::get('/test',function(){
    $user = User::first();
    $user->notify(new \\App\\Notifications\\TestNotification());
});
پویا پارسایی ۳۱ اردیبهشت ۱۴۰۱، ۱۰:۴۲

من چک کردم و خودم تغییر دادم باز نشد!!

رفتم پروژه استاد رو که پیوست کردن تست کردم دیدم باز نشد! ?

بعد console ور چک کردم دیدم کد درست اما گویا سیاست‌های مرورگر تغییر داشته و لودش نکرده

45c3-Screen Shot 2022-05-21 at 4.09.14 PM.png

شما مراحل رو درست رفتید نگران سورستون نباشید

بهترین پاسخ
محمد گازری ۳۱ اردیبهشت ۱۴۰۱، ۱۱:۴۰