草庐IT

smtp-auth

全部标签

php - 无法使用 PHP SMTP 发送电子邮件。您的服务器可能未配置为使用此方法发送邮件

我正在使用codeigniter我在实时服务器上执行了代码。使用print_debugger()出现以下错误UnabletosendemailusingPHPSMTP.Yourservermightnotbeconfiguredtosendmailusingthismethod.publicfunctionsendEnquiry(){$this->load->library('email');$name=$this->input->post("fname");$cemail=$this->input->post("email");$pno=$this->input->post("pho

php - 警告 : mail() [function. 邮件] : SMTP server response: 553 We do not relay non-local mail, 抱歉

以下脚本使用mail函数发送电子邮件。但我无法发送电子邮件。单击submit后会显示:Warning:mail()[function.mail]:SMTPserverresponse:553Wedonotrelaynon-localmail,sorry.inE:\xampp\htdocs\feedback.phponline19mailsentsuccessfully脚本Emailofsender:Subject:Enteryourfeedbackhere:";}?>我正在使用Apache作为php服务器还要说明为什么我们必须编写$subject、$message即在邮件参数中使用$符

php - Laravel-5 添加 hasRole 方法到 Auth

我正在尝试扩展Laravel-5.1Auth中间件,以便我可以向其中添加我自己的方法:Auth::hasRole()我需要做什么才能将新方法hasRole添加到Auth?这是我的路线文件:/*AdministratorRoutes*/Route::group(['namespace'=>'Admin','middleware'=>'timesheets.admin:Administrator'],function(){Route::get('home','AdminController@index');});这是我的中间件文件:auth=$auth;}/***Handleanincom

php - Laravel 5.6 在 Controller 构造函数中访问 auth()->user()?

我试图在Controller构造函数中访问auth()->user(),但它总是返回null。我在下面尝试过,但没有成功!protected$user;function__construct(){$this->middleware(function($request,$next){$this->user=auth()->user();return$next($request);});}有什么办法吗?--谢谢 最佳答案 ControllerConstructor在Middlewares之前被调用。所以在Constructor()中无法

php mail function error -> Warning : mail() [function. mail] : SMTP server response: 530 5. 7.0 必须先发出STARTTLS命令

我正在尝试从php向gmail帐户发送电子邮件。我的笔记本电脑上有以下设置:Windows8InternetconnectionXAMPP1.7.4,PHPVersion5.3.5,我有以下php.ini设置[mailfunction];ForWin32only.;http://php.net/smtpSMTP=smtp.gmail.com;http://php.net/smtp-portsmtp_port=:465;ForWin32only.;http://php.net/sendmail-from;sendmail_from=postmaster@localhost;ForUnix

php - PEAR Auth 真的是 PHP 身份验证的可行选择吗?

查看HowcanIstoremyusers'passwordssafely?,加密密码的最佳方法是使用phpass。我想使用PEARAuth包进行身份验证,但PEAR仅支持md5、sha1、sha256、sha512并且PEAR不向哈希添加盐。PEARAuth也不支持HowshouldIchooseanauthenticationlibraryforCodeIgniter?中列出的许多功能支持reCAPTCHA激活邮件未激活的帐户会自动过期使用phpass进行哈希处理(并在数据库中对自动登录代码进行哈希处理)针对登录尝试失败的非常合理的安全模型(针对机器人程序和DoS攻击的良好保护)“

php - Codeigniter ion auth 忘记密码不发送电子邮件

如果我提交重置新密码到我的电子邮件,CodeIgniter不会发送邮件。但它会返回一条消息,提示已发送密码重置电子邮件。所以它不会触发错误。我正在使用CodeIgniter2.1.4和IonAuth2.5.2$config['use_ci_email']=TRUE;我已经将此配置设置为TRUE,但仍未发送邮件。 最佳答案 不要更改“ion_auth.php”中的任何内容。文件原样:$config['use_ci_email']=FALSE;//SendEmailusingthebuiltinCIemailclass,iffalsei

php - Laravel Auth Logout() + Session Flush() 没有注销用户

我已经有大约3个月无法成功注销我的应用程序了。注销路由上的Controller代码:Auth::logout();Session::flush();值得一提的是,用户表中的remembertoken列不为空,并且session配置驱动器是文件。编辑:我注意到注销后数据库中的内存token值正在更改,同时表现出保持登录的行为。 最佳答案 尝试使用publicfunctiongetLogout(){Auth::logout();//Session::flush();returnRedirect::to('login')->with('m

php - zf2 - gmail smtp 不工作

我之前用于发送邮件的smtp设置如下,并且工作正常。$options=newMail\Transport\SmtpOptions(array('name'=>'gmail.com','host'=>'smtp.gmail.com','port'=>465,'connection_class'=>'login','connection_config'=>array('username'=>'myname@mywebsite.com','password'=>'password','ssl'=>'ssl',),));$transport=newMail\Transport\Smtp($op

php - 在 laravel 5 中集成 hybrid_auth

我是laravel框架的新手,任何帮助将不胜感激当我尝试执行以下代码时出现此错误FatalErrorExceptioninSocialController.phpline27:Class'App\Http\Controllers\Hybrid_Auth'notfoundinSocialController.phpline27当我从SocialController.php中删除命名空间时,我收到此错误提示BaseControllernotfound。点击这个按钮  Facebook社交Controller.phpauthenticate('Facebook');$pr