我想使用谷歌应用引擎发送一个包含此代码的简单电子邮件.但没有任何反应,为了使用邮件api,我必须配置一些东西吗?这在localhost上运行.我使用gmail作为邮件主机.
String host = "smtp.google.com";
String to = "example@yahoo.fr";
String from = "example@gmail.com";
String subject = "this is a test";
String messageText = "test";
boolean sessionDebug = false;
// Create some properties and get the default Session.
Properties props = System.getProperties();
props.put("mail.host", host);
props.put("mail.transport.protocol", "smtp");
Session mailSession = Session.getDefaultInstance(props, null);
// Set debug on the Session
// Passing false will not echo debug info, and passing True will.
mailSession.setDebug(sessionDebug);
// Instantiate a new MimeMessage and fill it with the
// …Run Code Online (Sandbox Code Playgroud) 我在magento中制作了一个自定义网格,显示已保存的视频网址及其工作情况.但我想只显示记录中,其中urlid是例如3.这是我的_prepareCollection功能
protected function _prepareCollection()
{
// Get and set the collection for the grid
$collection = Mage::getResourceModel('drecomm_productvideo/video_collection');
//what should i put in here, addFieldtoSelect?
$this->setCollection($collection);
return parent::_prepareCollection();
}
Run Code Online (Sandbox Code Playgroud)
我的网格延伸,Mage_Adminhtml_Block_Widget_Grid并且addFieldToFilter该类中没有任何功能.