Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/tfs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Laravel电子邮件模板URL在Gmail中不起作用_Php_Email_Laravel 4_Gmail_Html Email - Fatal编程技术网

Php Laravel电子邮件模板URL在Gmail中不起作用

Php Laravel电子邮件模板URL在Gmail中不起作用,php,email,laravel-4,gmail,html-email,Php,Email,Laravel 4,Gmail,Html Email,我正在使用Laravel 4 smtp邮件向用户发送邮件。当我向Gmail发送邮件时,徽标和URL没有按预期显示。当我检查URL时,它显示的是localhost而不是我的域名。我不知道为什么会这样 我的电子邮件模板: <!DOCTYPE html> <html lang="en-US"> <head> <meta charset="utf-8"> <link href='https://fonts.go

我正在使用Laravel 4 smtp邮件向用户发送邮件。当我向Gmail发送邮件时,徽标和URL没有按预期显示。当我检查URL时,它显示的是localhost而不是我的域名。我不知道为什么会这样

我的电子邮件模板:

<!DOCTYPE html>
<html lang="en-US">
    <head>
        <meta charset="utf-8">
        <link href='https://fonts.googleapis.com/css?family=Dosis:400,500,600,700' rel='stylesheet' type='text/css'>
        <style>
        body {
            font-family: 'Dosis', sans-serif;
            font-size:14px;
            color: #333;
        }
        #table-wrap {
            background:#fafafa;
            border-bottom: 5px solid #eee;
            border-top: 5px solid #EC4F48;
        }
        #site_logo{
            background: #EC4F48; 
            border-bottom: 2px solid #EC4F48;
            -webkit-border-bottom-right-radius: 2px;
            -webkit-border-bottom-left-radius: 2px;
            -moz-border-radius-bottomright: 2px;
            -moz-border-radius-bottomleft: 2px;
            border-bottom-right-radius: 2px;
            border-bottom-left-radius: 2px;
        }
        </style>        
    </head>
    <body>
        <table id="table-wrap" width="100%" cellpadding="0" cellspacing="0" style="border-radius:3px; -webkit-border-radius:3px; -moz-border-radius:3px;">
            <tbody>
                <tr>
                    <td align="left" style="padding:3px; border-bottom: 2px solid #fadc65;" width="60%">
                        <h3 style="margin-left: 15px;">Hi, {{{ $username }}}!</h3>
                    </td>
                    <td align="center" id="site_logo">
                        <img src="{{ asset('dist/img/logo.png') }}" width="200" style="margin-left: 10px;" />
                    </td>
                </tr>
                <tr>
                    <td align="center" colspan="2">
                        <br />
                            <h2>Welcome to mydomain.com !</h2>
                            <h2>Thanks for registering to Mysite.</h2>
                            <h4><a href="{{ url('user/verify/'.$code) }}" target="_blank">Click here to confirm your email...</a></h4>
                        <br />
                    </td>
                </tr>
                <tr>
                    <td align="left">
                        <p style="margin-left: 20px; color: #666;">
                         www.mydomain.com&nbsp; | &nbsp;Email : feedback@mydomain.com
                        </p>
                    </td>
                </tr>
            </tbody>
        </table>


    </body>
</html>

身体{
字体系列:“Dosis”,无衬线;
字体大小:14px;
颜色:#333;
}
#桌套{
背景:#fafafa;
边框底部:5px实心#eee;
边框顶部:5px实心#EC4F48;
}
#网站标志{
背景#EC4F48;
边框底部:2px实心#EC4F48;
-webkit边框右下半径:2px;
-webkit边框左下半径:2px;
-moz边框半径右下角:2px;
-moz边框半径左下角:2px;
边框右下半径:2px;
边框左下半径:2px;
}
你好,{{{$username}}}!

欢迎来到mydomain.com! 感谢您注册我的网站。

www.mydomain.com |电子邮件:feedback@mydomain.com


当您使用CLI生成任何视图时,Laravel使用
url
参数来设置域。默认情况下,其值设置为
http://localhost
因此您需要将此参数更改为您的域

该参数位于
config
文件夹中的
app.php

应用程序URL的Laravel注释:
控制台使用此URL在使用Artisan命令行工具时正确生成URL。您应该将其设置为应用程序的根目录,以便在运行Artisan任务时使用。

当您使用CLI生成任何视图时,Laravel使用
url
参数设置域。默认情况下,其值设置为
http://localhost
因此您需要将此参数更改为您的域

该参数位于
config
文件夹中的
app.php

应用程序URL的Laravel注释:
控制台使用此URL在使用Artisan命令行工具时正确生成URL。您应该将其设置为应用程序的根目录,以便在运行Artisan任务时使用。

是否使用CLI发送此电子邮件或在浏览器中触发此电子邮件?@l3ehnam yes its CLI。我为它做了一个变通。您是使用CLI发送此电子邮件还是在浏览器中触发此电子邮件?@l3ehnam yes its CLI。我做了一个变通,这不是答案,这不是答案