php邮件脚本错误5

时间:2015-09-29 11:17:55

标签: php email

这是我的代码,我已经做了一切使它工作,但我卡住了。我无法通过此代码发送电子邮件..

// application.hbs

<div class="container-fluid">

    <div class="row">

    <div class="col-sm-3 col-md-2 sidebar">
      {{side-bar}}
    </div>

    <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">

        {{outlet}}

      </div>

    </div>

</div>

// templates/components/side-bar.hbs

<ul class="nav nav-sidebar">
  {{#each posts as |post|}}
    <li>{{#link-to author}}{{post.author.name}}{{/link-to}}</li>
  {{/each}}
</ul>



// components/side-bar.js

// This triggers once the component is called out {{side-bar}}. 
init: function() {
   // You're extending ember component class here
   // This class has its own init function if u dont call 
  // _super() it means that the component has not yet been 
  // Initialised and component's not working.
   this._super();
 // Use your queries or what ever u need here
 // e.g query('posts', { user: 1 })
  this.set('posts', this.get('store').find(x));
}

2 个答案:

答案 0 :(得分:1)

我尝试了你的代码,没有if ( isset ..语句。 您的代码成功运行。请添加其他代码或错误。

请务必检查您的垃圾邮件文件夹。

答案 1 :(得分:1)

问题出在标题部分。您忘了在第8行添加.。请看一下并更正它。

      $headers = "From: Find Dealer ";
      $headers .= "Reply-To: ". strip_tags("usman_86@rocketmail.com") . "\r\n";
      $headers .= 'MIME-Version: 1.0' . PHP_EOL;
      $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";

由于这个错误,标题只包含mime版本信息,内容类型和字符集。