2011-12-19 66 views
0

我在使用Propel 1.6(sfPropelORMPlugin)在Symfony 1.4.14項目中發送郵件時遇到問題。當我試圖運行: ./symfony project:send-emails --message-limit=2 --time-limit=20我收到錯誤:Symfony發送電子郵件任務不起作用

PHP Warning: call_user_func() expects parameter 1 to be a valid callback, class 'MailMessagePeer' does not have a method 'getSpooledMessages' in /srv/www/mailing/trunk/plugins/sfPropelORMPlugin/lib/mailer/Swift_PropelSpool.class.php on line 105 

Warning: call_user_func() expects parameter 1 to be a valid callback, class 'MailMessagePeer' does not have a method 'getSpooledMessages' in /srv/www/mailing/trunk/plugins/sfPropelORMPlugin/lib/mailer/Swift_PropelSpool.class.php on line 105 
PHP Warning: Invalid argument supplied for foreach() in /srv/www/mailing/trunk/plugins/sfPropelORMPlugin/lib/mailer/Swift_PropelSpool.class.php on line 115 

Warning: Invalid argument supplied for foreach() in /srv/www/mailing/trunk/plugins/sfPropelORMPlugin/lib/mailer/Swift_PropelSpool.class.php on line 115 

這是我的schema.yml:

mail_message: 
    message: { type: blob, required: true } 
    created_at: ~ 

factories.yml文件的部分:

all: 
    routing: 
    class: sfPatternRouting 
    param: 
     generate_shortest_url:   true 
     extra_parameters_as_query_string: true 

    mailer: 
    class: sfMailer 
    param: 
     logging:   %SF_LOGGING_ENABLED% 
     charset:   %SF_CHARSET% 
     delivery_strategy: spool 
     spool_class:  Swift_PropelSpool 
     spool_arguments: [ MailMessage, message, getSpooledMessages ] 
     transport: 
     class: Swift_SmtpTransport 
     param: 
      host:  smtp.mail.com 
      port:  465 
      encryption: ssl 
      username: myusername 
      password: mypass 

回答

-1

刪除SSL加密和使用端口25