草庐IT

silverstripe-smtp

全部标签

php - Silverstripe 清除/删除 TreeDropdownField

我正在为SiteTree下拉菜单使用TreeDropdownField,尽管这是一个可选字段并且希望能够清除/删除该值。我如何使用Silverstripe做到这一点?'Text','ExternalText'=>'Varchar','ImageLink'=>'Text');static$has_one=array("Image"=>"Image","InternalLink"=>"SiteTree");static$allowed_children=array("none");publicfunctiongetCMSFields(){$fields=parent::getCMSFiel

php - 使用 silverstripe 3.1 创建 pdf 的最佳方法?

我想在服务器端创建一个PDF文件。最好的方法是什么?有谁知道好的解决方案吗?提前致谢 最佳答案 还有silverstripe-tcpdf:https://github.com/mparkhill/silverstripe-tcpdf如果您在插件站点上搜索PDF,也可以找到此模块:-)http://addons.silverstripe.org/add-ons?search=pdf 关于php-使用silverstripe3.1创建pdf的最佳方法?,我们在StackOverflow上找到

php - 如何在 PHP Laravel 5 中配置 Amazon SES SMTP?

我已将AmazonSES集成到PHPLaravel5项目中,但我无法发送电子邮件,因为我收到此错误,Swift_TransportExceptioninAbstractSmtpTransport.phpline383:Expectedresponsecode250butgotcode"530",withmessage"530Authenticationrequired"谁能告诉我如何配置AmazonSES.. 最佳答案 确保您已配置环境变量:像下面这样:MAIL_DRIVER=smtpMAIL_HOST=email-smtp.us-

php - 如何将调试消息写入 Silverstripe 日志文件

我有一个正在开发中的Silverstripe3.1站点,我想将消息写入默认日志文件-silverstripe.log这是我们用来向屏幕输出变量或消息的方式:Debug::show($variable);Debug::message("Debugmessagegoeshere");将这些输出到silverstripe.log文件的最简单方法是什么?我一直在查看文档,但找不到正确的方法:http://doc.silverstripe.com/framework/en/topics/debugging 最佳答案 您可以执行以下操作:在my

php - Silverstripe - 删除数据对象而不是使用自定义 sql 查询的更好方法

有没有更好的方法来删除早于x天的数据对象而不是使用自定义sql查询?这就是我现在做的$host='localhost';$username='db123';$password='pass';$db_name='db123';mysql_connect("$host","$username","$password")ordie("cannotconnect");mysql_select_db("$db_name")ordie("cannotselectDB");$sql="DELETEFROMCartWHERECreated 最佳答案

php - Gmail SMTP 在 ec2 实例中不工作

我正在使用基于Ubuntu的ec2实例,最近我将我的代码转移到aws上,但电子邮件功能似乎无法正常工作。我正在使用gmailSMTP服务下面是我的代码'Smtpmail'=>array('class'=>'application.extensions.smtpmail.PHPMailer','Host'=>"smtp.gmail.com",'Username'=>'username','Password'=>'password','From'=>'fromaddr','setForm'=>'fromname','Mailer'=>'smtp','SMTPSecure'=>'tls','

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 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 - 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