This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » support » symfony 1.3 and 1.4 » project:send-emails dont work because strategy always none
project:send-emails dont work because strategy always none [message #93956] Sun, 21 February 2010 00:02 Go to previous message
adrianrz  is currently offline adrianrz
Messages: 18
Registered: July 2009
Location: Argentina
Junior Member
Hello,

I use spool strategy from the contact form and all work fine:
the class save the table register (at mail-message table)
but when i run send-email task, show a red message:
You can only send messages in the spool if the delivery strategy is "spool" (none is the current strategy). and stop the task script.

The factory.yml
mailer:
    class: sfMailer
    param:
      charset: iso-8859-1                        # charset to use : utf-8, iso-8859-1, ...
      encoding: 8bit                             # 7bit, 8bit, quoted-printable, base64 (default : quoted-printable)
      delivery_strategy: spool
      spool_class:       Swift_DoctrineSpool
      spool_arguments:   [ MailMessage, message, getSpooledMessages ]
      transport:
        class: Swift_SmtpTransport
        param:
          host:       localhost
          port:       25
          encryption: ~
          username:   ~
          password:   ~  


I have clear the cache and the i have verify the cache factory generated file (config_factories.yml.php) and all is well
require_once sfConfig::get('sf_symfony_lib_dir').'/vendor/swiftmailer/classes/Swift.php';
Swift::registerAutoload();
sfMailer::initialize();
$this->setMailerConfiguration(array_merge(array('class' => sfConfig::get('sf_factory_mailer', 'sfMailer')), sfConfig::get('sf_factory_mailer_parameters', array (
  'logging' => '',
  'charset' => 'iso-8859-1',
  'delivery_strategy' => 'spool',
  'transport' => 
  array (
    'class' => 'Swift_SmtpTransport',
    'param' => 
    array (
      'host' => 'localhost',
      'port' => 25,
    ),
  ),
  'encoding' => '8bit',
  'spool_class' => 'Swift_DoctrineSpool',
  'spool_arguments' => 
  array (
    0 => 'MailMessage',
    1 => 'message',
    2 => 'getSpooledMessages',
  ),
))));


Anybody help me?

Thanks in advance.

Adrián

Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:[SOLVED] Doctrine Sluggable. Where is getSlug()?
Next Topic:Currency Converter (sfRatePlugin)
Goto Forum:

  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software