预期的响应代码250,但得到代码“530”,消息“530 5.7.0必须首先发出STARTTLS命令

时间:2016-11-23 11:00:29

标签: mysql laravel-5.2 sendmail

我正在尝试从Laravel发送电子邮件,Env设置为

a0=5
a1=6
a2=7
b0=3
b1=6
b2=10
a_points=0
b_points=0

def test_val(a_points,b_points,val1,val2):
    if val1 > val2:
        a_points+=1

    elif val2 > val1:
        b_points+=1

    return a_points, b_points



a_points, b_points = test_val(a_points,b_points,a0,b0)
a_points, b_points = test_val(a_points,b_points,a1,b1)
a_points, b_points = test_val(a_points,b_points,a2,b2)

print(a_points,b_points)

'Mial.php'也是相同的值,当我尝试发送主时我有以下错误

APP_ENV=local
APP_DEBUG=true
APP_KEY=base64:LgB1943ksdzDoHtwq47NsOn8ALDAs61WJkLEmCxo7Rg=
APP_URL=http://localhost

DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=taniscart
DB_USERNAME=root
DB_PASSWORD=

CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=......@gmail.com
MAIL_PASSWORD=.....
MAIL_ENCRYPTION=tls

1 个答案:

答案 0 :(得分:2)

我有同样的问题而且它消失了我添加了" MAIL_ENCRYPTION = tls"