草庐IT

smtp-auth

全部标签

使用带有 Gmail 的 smtp 的 Phpmailer 无法正常工作 - 连接超时

我查看了以下链接:phpmailersendgmailsmtptimeoutsendemailusingGmailSMTPserverthroughPHPMailerhttp://uly.me/phpmailer-and-gmail-smtp/...并尝试为自己实现这些组合,但是...大多数时候它会发送此消息...Messagecouldnotbesent.MailerError:SMTPconnect()failed.然而,当我在“tls”和“ssl”之间进行试验时,有一次它发送了这个......SMTPERROR:Failedtoconnecttoserver:Connection

php - Laravel Auth::attempt 每次都失败

我在我的laravel应用程序上创建了一个测试用户。详情是用户:joe@gmail.com密码:123456当我完成注册过程时,一切都按预期进行,并且在数据库的用户表中创建了一个条目完成后,我将用户重定向到仪表板。publicfunctionpostCreate(){//Rules$rules=array('fname'=>'required|alpha|min:2','lname'=>'required|alpha|min:2','email'=>'required|email|unique:users','password'=>'required|alpha_num|between

php - 我可以将 Ion auth 设置为通过用户名或电子邮件登录吗

我知道我可以在配置中将ionauth设置为通过用户名登录,我也知道我可以在配置中将它设置为通过电子邮件登录。有没有一种简单的方法可以将其设置为自动使用? 最佳答案 如果是自动的,你的意思是先尝试一个,然后再尝试另一个,看看其中一个是否给出有效的返回:登录发生在ion_auth_model行:899->where($this->identity_column,$this->db->escape_str($identity))因此您可以将其更改为执行“或”并尝试两列。您需要在整个模型中执行此操作,因为要考虑的不仅仅是实际登录,还有一个用

php - 邮件程序错误 : SMTP Error: The following SMTP Error: Data not accepted

下面的代码给出了消息MailerError:SMTPError:ThefollowingSMTPError:Datanotaccepted.ButwhenIreplace$EmailAddwithaa@yahoo.com.Themailwassent.我的代码有什么问题?我是php的新手,尤其是在处理邮件功能方面。$sql1="SELECTEmail_AddressFROMparticipantablewhereIDno=$studId";$result1=mysql_query($sql1);while($row1=mysql_fetch_assoc($result1)){$Emai

php - swiftmailer 对于 smtp 完全损坏?

刚刚将我的swiftmailercheckout更新到最新版本4.3.0。以下非常简单的代码不再有效,连接超时:setUsername('USERNAME')->setPassword('PASSWORD');$mailer=Swift_Mailer::newInstance($transport);//Createamessage$message=Swift_Message::newInstance('Yo')->setFrom(array('jnankin@gmail.com'=>'Josh'))->setTo(array('jnankin@gmail.com'))->setBod

php - 拉维尔 4 : Two different view pages for a single URI based on auth status

我最近开始使用Laravel4进行开发,我对路由有疑问。对于“/”,我希望根据用户的授权状态有两个不同的View页面。如果用户已登录并正在查看“/”,我想向他们展示一个带有管理控件的View,当用户在未登录的情况下以普通用户的身份查看“/”时,我想提供一个一般信息View。为了实现这一点,我一直在尝试使用过滤器“auth”和“guest”,但没有成功。//应用程序/routes.php//routeforloggedinusersRoute::get('/',array('before'=>'auth',function(){return'loggedin!';}));//fornor

php - 如何通过 PHP 检查我的脚本是否连接到 SMTP 服务器

正如标题所言。想知道如何检查连接是否正常工作,如果不正常,错误是什么。顺便说一句,SMTP服务器是exchange2007。 最佳答案 如果您想知道是否可以从任何运行PHP的地方访问SMTP服务器,那么您只需在适当的端口(默认为25)上连接到它,然后查看是否在结果。$f=fsockopen('smtphost',25);if($f!==false){$res=fread($f,1024);if(strlen($res)>0&&strpos($res,'220')===0){echo"Success!";}else{echo"Erro

php - 在 Laravel 5.1 中使用中间件时出现 Class jwt-auth does not exist 错误

我按照官方的JWT-Auth安装https://github.com/tymondesigns/jwt-auth/wiki/Installation.现在我的Controller中有一个中间件:$this->middleware('jwt-auth',['only'=>['postChange','postChoose']]);我还在config/app.php的提供程序数组中添加了Tymon\JWTAuth\Providers\JWTAuthServiceProvider::class但是,当我向API发出请求时,我收到此错误消息:ReflectionExceptioninConta

php - 拉维尔 4 : Stock Auth login won't persist across pages

从所有教程中,我应该能够对用户进行身份验证,然后跳转到任何其他页面,并保持登录。然而,这不起作用。自定义编译的PHPLAMP堆栈。应用存储是可写的。与教程的唯一区别是我使用的是电子邮件而不是用户名。http://laravelbook.com/laravel-user-authentication/http://codehappy.daylerees.com/authenticationsession有效,因为我能够将var存储到session并在不同的页面上读出它。models/User.php(股票)useIlluminate\Auth\UserInterface;useIllum

php - Laravel 5.2 -> 5.3 Auth::user() 返回 null

我已经从5.2升级到5.3,Auth::user()返回null。路线Route::group(['middleware'=>['auth']],function(){Route::get('/test','MyController@showMain');}Controller构造函数调用Auth::check()返回nullpublic$user;publicfunction__construct(){$this->user=Auth::user();}publicfunctionshowMain(){return$this->user;}ControllershowMain调用Au