[symfony-users] Re: Swift mail in Symfony 1.3

2009-10-22 Thread Alexandru-Emil Lupu
On Thu, Oct 22, 2009 at 12:35 PM, Alexandru-Emil Lupu
gang.al...@gmail.comwrote:

 Hi there!

 I have a problem with my mailer system on sf 1.3. i do get this error:

 Catchable fatal error: Argument 1 passed to
 Swift_Transport_SpoolTransport::registerPlugin() must be an instance of
 Swift_Events_EventListener, instance of sfMailerMessageLoggerPlugin given,
 called in /media/disk1/symfony/1.3/lib/mailer/sfMailer.class.php on line 140
 and defined in
 /media/disk1/symfony/1.3/lib/vendor/swiftmailer/classes/Swift/Transport/SpoolTransport.php
 on line 111


 I have this in my application's factories.yml


 all:
   mailer:
 class: sfMailer
 param:
   logging:   %SF_LOGGING_ENABLED%
   charset:   %SF_CHARSET%
   delivery_strategy: spool
   spool_class:   Swift_PropelSpool
   spool_arguments:   [ MailMessage, message ]
   transport:
 class: Swift_SmtpTransport
 param:
   host:   localhost
   port:   25
   encryption: ~
   username:   ~
   password:   ~



 this is my piece of code

 $message = new Swift_Message(__('app register service'));
 $message-setTo($options['mailto']);
 $message-setFrom(CustomConfig::getRegisterFromEmailAddress());
 $message-attach(new
 Swift_Message_Part($this-getPartial('mail/mailRegisterHtmlBody',
 $mailContext), 'text/html'));
 $message-attach(new
 Swift_Message_Part($this-getPartial('mail/mailRegisterTextBody',
 $mailContext), 'text/plain'));
 $this-getMailer()-send($message);


 And this is my my_project/lib/vendor/swift/Swift.php class version

  * @version 3.3.2

 Any ideas what i have done wrong ?

 Thanks
 Alecs

 --
 As programmers create bigger  better idiot proof programs, so the universe
 creates bigger  better idiots!
 I am on web:  http://www.alecslupu.ro/
 I am on twitter: http://twitter.com/alecslupu
 I am on linkedIn: http://www.linkedin.com/in/alecslupu
 Tel: (+4)0748.543.798


I have several tests and it seem that the script is failing on this
occasions :


transporter: Swift_MailTransport
delivery_strategy: realtime
error: Catchable fatal error: Argument 1 passed to
Swift_Transport_MailTransport::registerPlugin() must be an instance of
Swift_Events_EventListener, instance of sfMailerMessageLoggerPlugin given,
called in /media/disk1/symfony/1.3/lib/mailer/sfMailer.class.php on line 140
and defined in
/media/disk1/symfony/1.3/lib/vendor/swiftmailer/classes/Swift/Transport/MailTransport.php
on line 211
delivery_strategy: single_address
error: Catchable fatal error: Argument 1 passed to
Swift_Transport_MailTransport::registerPlugin() must be an instance of
Swift_Events_EventListener, instance of Swift_Plugins_RedirectingPlugin
given, called in /media/disk1/symfony/1.3/lib/mailer/sfMailer.class.php on
line 130 and defined in
/media/disk1/symfony/1.3/lib/vendor/swiftmailer/classes/Swift/Transport/MailTransport.php
on line 211
delivery_strategy: spool
error: Catchable fatal error: Argument 1 passed to
Swift_Transport_SpoolTransport::registerPlugin() must be an instance of
Swift_Events_EventListener, instance of sfMailerMessageLoggerPlugin given,
called in /media/disk1/symfony/1.3/lib/mailer/sfMailer.class.php on line 140
and defined in
/media/disk1/symfony/1.3/lib/vendor/swiftmailer/classes/Swift/Transport/SpoolTransport.php
on line 111


transporter: Swift_SendmailTransport
delivery_strategy: realtime
error: Catchable fatal error: Argument 1 passed to
Swift_Transport_AbstractSmtpTransport::registerPlugin() must be an instance
of Swift_Events_EventListener, instance of sfMailerMessageLoggerPlugin
given, called in /media/disk1/symfony/1.3/lib/mailer/sfMailer.class.php on
line 140 and defined in
/media/disk1/symfony/1.3/lib/vendor/swiftmailer/classes/Swift/Transport/AbstractSmtpTransport.php
on line 247
delivery_strategy: single_address
error: Catchable fatal error: Argument 1 passed to
Swift_Transport_AbstractSmtpTransport::registerPlugin() must be an instance
of Swift_Events_EventListener, instance of Swift_Plugins_RedirectingPlugin
given, called in /media/disk1/symfony/1.3/lib/mailer/sfMailer.class.php on
line 130 and defined in
/media/disk1/symfony/1.3/lib/vendor/swiftmailer/classes/Swift/Transport/AbstractSmtpTransport.php
on line 247
delivery_strategy: spool
error: Catchable fatal error: Argument 1 passed to
Swift_Transport_SpoolTransport::registerPlugin() must be an instance of
Swift_Events_EventListener, instance of sfMailerMessageLoggerPlugin given,
called in /media/disk1/symfony/1.3/lib/mailer/sfMailer.class.php on line 140
and defined in
/media/disk1/symfony/1.3/lib/vendor/swiftmailer/classes/Swift/Transport/SpoolTransport.php
on line 111


transporter: Swift_SmtpTransport
delivery_strategy: realtime
error: Catchable fatal error: Argument 1 passed to
Swift_Transport_AbstractSmtpTransport::registerPlugin() must be an instance
of 

[symfony-users] Re: Swift mail in Symfony 1.3

2009-10-22 Thread Alexandru-Emil Lupu
On Thu, Oct 22, 2009 at 2:38 PM, Alexandru-Emil Lupu
gang.al...@gmail.comwrote:



 On Thu, Oct 22, 2009 at 12:35 PM, Alexandru-Emil Lupu 
 gang.al...@gmail.com wrote:

 Hi there!

 I have a problem with my mailer system on sf 1.3. i do get this error:

 Catchable fatal error: Argument 1 passed to
 Swift_Transport_SpoolTransport::registerPlugin() must be an instance of
 Swift_Events_EventListener, instance of sfMailerMessageLoggerPlugin given,
 called in /media/disk1/symfony/1.3/lib/mailer/sfMailer.class.php on line 140
 and defined in
 /media/disk1/symfony/1.3/lib/vendor/swiftmailer/classes/Swift/Transport/SpoolTransport.php
 on line 111


 I have this in my application's factories.yml


 all:
   mailer:
 class: sfMailer
 param:
   logging:   %SF_LOGGING_ENABLED%
   charset:   %SF_CHARSET%
   delivery_strategy: spool
   spool_class:   Swift_PropelSpool
   spool_arguments:   [ MailMessage, message ]
   transport:
 class: Swift_SmtpTransport
 param:
   host:   localhost
   port:   25
   encryption: ~
   username:   ~
   password:   ~



 this is my piece of code

 $message = new Swift_Message(__('app register service'));
 $message-setTo($options['mailto']);
 $message-setFrom(CustomConfig::getRegisterFromEmailAddress());
 $message-attach(new
 Swift_Message_Part($this-getPartial('mail/mailRegisterHtmlBody',
 $mailContext), 'text/html'));
 $message-attach(new
 Swift_Message_Part($this-getPartial('mail/mailRegisterTextBody',
 $mailContext), 'text/plain'));
 $this-getMailer()-send($message);


 And this is my my_project/lib/vendor/swift/Swift.php class version

  * @version 3.3.2

 Any ideas what i have done wrong ?

 Thanks
 Alecs

 --
 As programmers create bigger  better idiot proof programs, so the
 universe creates bigger  better idiots!
 I am on web:  http://www.alecslupu.ro/
 I am on twitter: http://twitter.com/alecslupu
 I am on linkedIn: http://www.linkedin.com/in/alecslupu
 Tel: (+4)0748.543.798


 I have several tests and it seem that the script is failing on this
 occasions :


 transporter: Swift_MailTransport
 delivery_strategy: realtime
 error: Catchable fatal error: Argument 1 passed to
 Swift_Transport_MailTransport::registerPlugin() must be an instance of
 Swift_Events_EventListener, instance of sfMailerMessageLoggerPlugin given,
 called in /media/disk1/symfony/1.3/lib/mailer/sfMailer.class.php on line 140
 and defined in
 /media/disk1/symfony/1.3/lib/vendor/swiftmailer/classes/Swift/Transport/MailTransport.php
 on line 211
 delivery_strategy: single_address
 error: Catchable fatal error: Argument 1 passed to
 Swift_Transport_MailTransport::registerPlugin() must be an instance of
 Swift_Events_EventListener, instance of Swift_Plugins_RedirectingPlugin
 given, called in /media/disk1/symfony/1.3/lib/mailer/sfMailer.class.php on
 line 130 and defined in
 /media/disk1/symfony/1.3/lib/vendor/swiftmailer/classes/Swift/Transport/MailTransport.php
 on line 211
 delivery_strategy: spool
 error: Catchable fatal error: Argument 1 passed to
 Swift_Transport_SpoolTransport::registerPlugin() must be an instance of
 Swift_Events_EventListener, instance of sfMailerMessageLoggerPlugin given,
 called in /media/disk1/symfony/1.3/lib/mailer/sfMailer.class.php on line 140
 and defined in
 /media/disk1/symfony/1.3/lib/vendor/swiftmailer/classes/Swift/Transport/SpoolTransport.php
 on line 111


 transporter: Swift_SendmailTransport
 delivery_strategy: realtime
 error: Catchable fatal error: Argument 1 passed to
 Swift_Transport_AbstractSmtpTransport::registerPlugin() must be an instance
 of Swift_Events_EventListener, instance of sfMailerMessageLoggerPlugin
 given, called in /media/disk1/symfony/1.3/lib/mailer/sfMailer.class.php on
 line 140 and defined in
 /media/disk1/symfony/1.3/lib/vendor/swiftmailer/classes/Swift/Transport/AbstractSmtpTransport.php
 on line 247
 delivery_strategy: single_address
 error: Catchable fatal error: Argument 1 passed to
 Swift_Transport_AbstractSmtpTransport::registerPlugin() must be an instance
 of Swift_Events_EventListener, instance of Swift_Plugins_RedirectingPlugin
 given, called in /media/disk1/symfony/1.3/lib/mailer/sfMailer.class.php on
 line 130 and defined in
 /media/disk1/symfony/1.3/lib/vendor/swiftmailer/classes/Swift/Transport/AbstractSmtpTransport.php
 on line 247
 delivery_strategy: spool
 error: Catchable fatal error: Argument 1 passed to
 Swift_Transport_SpoolTransport::registerPlugin() must be an instance of
 Swift_Events_EventListener, instance of sfMailerMessageLoggerPlugin given,
 called in /media/disk1/symfony/1.3/lib/mailer/sfMailer.class.php on line 140
 and defined in
 /media/disk1/symfony/1.3/lib/vendor/swiftmailer/classes/Swift/Transport/SpoolTransport.php
 on line 111


 transporter: Swift_SmtpTransport
 delivery_strategy: realtime
 

[symfony-users] Re: Swift Mail 4.0.4

2009-09-26 Thread DEEPAK BHATIA
Thanks, I could resolve that. Yes we have to include swift_init.php.

On Sat, Sep 26, 2009 at 12:20 AM, Casey casey.cam...@gmail.com wrote:


 In the latest version of swift there is a file called init_swift.php
 or something that will not be autoloaded so you have to use require.
 That could be part of the problem.

 On Sep 25, 6:27 am, DEEPAK BHATIA toreachdee...@gmail.com wrote:
  Sorry, I have both old version of swift mail and new version of swift
 mail
  installed. I think this is causing some confusion.
 
  On Fri, Sep 25, 2009 at 6:36 PM, DEEPAK BHATIA toreachdee...@gmail.com
 wrote:
 
 
 
   Hi,
 
   I have installed the swift mail in the directory
 
   /opt/lampp/htdocs/crb/lib/vendor
 
   I have done php symfony cc many time but I am getting the error
 
   *Fatal error*: Call to undefined method Swift_Message::newinstance() in
 *
   /opt/lampp/htdocs/crb/apps/tool/modules/new/actions/actions.class.php*
 on
   line *55*
   **
   *Regards*
   **
   *Deepak*
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Swift Mail 4.0.4

2009-09-25 Thread DEEPAK BHATIA
Sorry, I have both old version of swift mail and new version of swift mail
installed. I think this is causing some confusion.

On Fri, Sep 25, 2009 at 6:36 PM, DEEPAK BHATIA toreachdee...@gmail.comwrote:

 Hi,

 I have installed the swift mail in the directory

 /opt/lampp/htdocs/crb/lib/vendor

 I have done php symfony cc many time but I am getting the error

 *Fatal error*: Call to undefined method Swift_Message::newinstance() in *
 /opt/lampp/htdocs/crb/apps/tool/modules/new/actions/actions.class.php* on
 line *55*
 **
 *Regards*
 **
 *Deepak*


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Swift Mail 4.0.4

2009-09-25 Thread Casey

In the latest version of swift there is a file called init_swift.php
or something that will not be autoloaded so you have to use require.
That could be part of the problem.

On Sep 25, 6:27 am, DEEPAK BHATIA toreachdee...@gmail.com wrote:
 Sorry, I have both old version of swift mail and new version of swift mail
 installed. I think this is causing some confusion.

 On Fri, Sep 25, 2009 at 6:36 PM, DEEPAK BHATIA toreachdee...@gmail.comwrote:



  Hi,

  I have installed the swift mail in the directory

  /opt/lampp/htdocs/crb/lib/vendor

  I have done php symfony cc many time but I am getting the error

  *Fatal error*: Call to undefined method Swift_Message::newinstance() in *
  /opt/lampp/htdocs/crb/apps/tool/modules/new/actions/actions.class.php* on
  line *55*
  **
  *Regards*
  **
  *Deepak*
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Swift Mail

2009-08-14 Thread Mr_chon



On 13 août, 20:24, DEEPAK BHATIA toreachdee...@gmail.com wrote:
 Yes, I know HTML very well but still need a good hand on it.

 On Thu, Aug 13, 2009 at 11:53 PM, Enosymb...@gmail.com wrote:

  On Thu, 13 Aug 2009, DEEPAK BHATIA wrote:

  I tried this and nto working

  $textbody = aText to appear as hyperlink/a;

  But I am not getting the hyperlink.

  Perhaps learning HTML might be a good idea?

  --

Maybe you should test your code in a template before testing it with
Swift.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Swift Mail

2009-08-14 Thread DEEPAK BHATIA

Ok.Thanks

On Fri, Aug 14, 2009 at 1:46 PM, Mr_chonshnd...@gmail.com wrote:



 On 13 août, 20:24, DEEPAK BHATIA toreachdee...@gmail.com wrote:
 Yes, I know HTML very well but still need a good hand on it.

 On Thu, Aug 13, 2009 at 11:53 PM, Enosymb...@gmail.com wrote:

  On Thu, 13 Aug 2009, DEEPAK BHATIA wrote:

  I tried this and nto working

  $textbody = aText to appear as hyperlink/a;

  But I am not getting the hyperlink.

  Perhaps learning HTML might be a good idea?

  --

 Maybe you should test your code in a template before testing it with
 Swift.
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Swift Mail

2009-08-13 Thread Mr_chon

Hi,

Not sure this has its place in a symfony group...

Anyways, if you're using Swift v3, the way I've made that work was :

$message = new Swift_Message('your subject');
$message-attach(new Swift_Message_part($mailBody, 'text/html'));

then you can send it...


On 13 août, 12:50, DEEPAK BHATIA toreachdee...@gmail.com wrote:
 Hi,

 As per the below code, the mail is send as text/html.

 $mailBody=b.This is the message.b

 But the message is not bold.

 Thanks

 Deepak
 ===

 try
 {
   // Create the mailer and message objects
   $mailer = new Swift(new Swift_Connection_NativeMail());
   $message = new Swift_Message('Mail\'s subject', $mailBody, 'text/html');

   // Send
   $mailer-send($message, $mailTo, $mailFrom);
   $mailer-disconnect();}

 catch (Exception $e)
 {
   $mailer-disconnect();

   // handle errors here

 }
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Swift Mail

2009-08-13 Thread Donald Tyler

You have two opening b tags in your body. The second one should be /b.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Swift Mail

2009-08-13 Thread DEEPAK BHATIA

I tried this and nto working

$textbody = aText to appear as hyperlink/a;

But I am not getting the hyperlink.

Regards

Deepak Bhatia

On Thu, Aug 13, 2009 at 6:52 PM, Donald Tylerchekot...@gmail.com wrote:

 You have two opening b tags in your body. The second one should be /b.

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Swift Mail

2009-08-13 Thread Tom Haskins-Vaughan

Surely you need to add the href?

$textbody = a href=http://example.com;Text to appear as hyperlink/a;

DEEPAK BHATIA wrote:
 I tried this and nto working
 
 $textbody = aText to appear as hyperlink/a;
 
 But I am not getting the hyperlink.
 
 Regards
 
 Deepak Bhatia
 
 On Thu, Aug 13, 2009 at 6:52 PM, Donald Tylerchekot...@gmail.com wrote:
 You have two opening b tags in your body. The second one should be /b.

 
  

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Swift Mail

2009-08-13 Thread DEEPAK BHATIA

Thanks..

On Thu, Aug 13, 2009 at 11:40 PM, Tom
Haskins-Vaughant...@templestreetmedia.com wrote:

 Surely you need to add the href?

 $textbody = a href=http://example.com;Text to appear as hyperlink/a;

 DEEPAK BHATIA wrote:
 I tried this and nto working

 $textbody = aText to appear as hyperlink/a;

 But I am not getting the hyperlink.

 Regards

 Deepak Bhatia

 On Thu, Aug 13, 2009 at 6:52 PM, Donald Tylerchekot...@gmail.com wrote:
 You have two opening b tags in your body. The second one should be /b.


 

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Swift Mail

2009-08-13 Thread Eno

On Thu, 13 Aug 2009, DEEPAK BHATIA wrote:

 I tried this and nto working
 
 $textbody = aText to appear as hyperlink/a;
 
 But I am not getting the hyperlink.


Perhaps learning HTML might be a good idea?



-- 



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Swift Mail

2009-08-13 Thread DEEPAK BHATIA

Yes, I know HTML very well but still need a good hand on it.

On Thu, Aug 13, 2009 at 11:53 PM, Enosymb...@gmail.com wrote:

 On Thu, 13 Aug 2009, DEEPAK BHATIA wrote:

 I tried this and nto working

 $textbody = aText to appear as hyperlink/a;

 But I am not getting the hyperlink.


 Perhaps learning HTML might be a good idea?



 --



 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Swift Mail

2009-08-13 Thread Eno

On Thu, 13 Aug 2009, DEEPAK BHATIA wrote:

 
 Yes, I know HTML very well but still need a good hand on it.
 
 On Thu, Aug 13, 2009 at 11:53 PM, Enosymb...@gmail.com wrote:
 
  On Thu, 13 Aug 2009, DEEPAK BHATIA wrote:
 
  I tried this and nto working
 
  $textbody = aText to appear as hyperlink/a;


Yep, the code above shows that you know HTML very well :-P



-- 



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---