Symfony send-email task does not work

I have problems with sending mails in Symfony 1.4.14 project with Propel 1.6 (sfPropelORMPlugin). When I am trying to run: ./symfony project:send-emails --message-limit=2 --time-limit=20 I am getting errors:

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

This is my schema.yml:

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

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

Answers


Do you have a "getSpooledMessages" method in your MailMessagePeer class?

See more about it here:

http://www.symfony-project.org/gentle-introduction/1_4/en/11-Emails


remove ssl encryption and use port 25


Need Your Help

Assign multiple DisplayMembers in MultiColumn ListBox C#

c# .net listbox datasource

I have a ListBox that has IEnumerable List<PhoneNumber> as DataSource.

DOM Parser query in JAVA

java xml dom xpath

<subjectOf typeCode="SUBJ">

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.