小编Fer*_*res的帖子

Git Bash 2.5无法连接到mysql

我有一个非常恼人的问题,通过Git Bash 2.5连接到MySQL(通过localhost上的Windows).通过CMD和Mysysgit一切正常.

$ mysql -u root -proot Warning: Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 7 Server version: 5.6.26-log MySQL Community Server (GPL) Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for …

mysql windows git git-bash

3
推荐指数
1
解决办法
1996
查看次数

SwiftMailer + Gmail - 无法发送电子邮件

我无法连接 Gmail SMTP 服务器。

看:

$transport = Swift_SmtpTransport::newInstance()
            ->setHost('smtp.gmail.com')
            ->setPort(465)
            ->setEncryption('ssl')
            ->setUsername('email@gmail.com')
            ->setPassword('mypasss');

    $mailer = Swift_Mailer::newInstance($transport);

    $message = Swift_Message::newInstance('Contato via Site')
            ->setFrom(array($email => $de))
            ->setTo(array($destinatario => 'Agência Linka'))
            ->setBody($corpo_mensagem, 'text/html')
            ->setCharset('UTF-8');

    $mailer->send($message);
Run Code Online (Sandbox Code Playgroud)

然后我得到了这个:

Fatal error: Uncaught exception 'Swift_TransportException' with message 'Connection could not be established with host smtp.gmail.com [ #0]' in ...
Run Code Online (Sandbox Code Playgroud)

任何人都经历过这种情况?

php gmail swiftmailer

2
推荐指数
1
解决办法
1万
查看次数

标签 统计

git ×1

git-bash ×1

gmail ×1

mysql ×1

php ×1

swiftmailer ×1

windows ×1