User mail in symfony 1.4

Can someone give me a rough idea or a link to instructions on how to create a custom spy-mail spool? I currently have a Doctrine base coil that sends messages and removes a queue element.

I would like to do the following:

  • Enter the field with the status (Sent, Denied, Failed, Email does not exist, etc.)
  • Update status field instead of deleting a queue item when sending
+4
source share
1 answer

I have never done such functions myself, but it looks like you can create your own spool class:

<?php class Swift_MySpool extends Swift_DoctrineSpool {} 

Enter the field with the status (Sent, Denied, Failed, Email does not exist, etc.)

The Swift_DoctrineSpool class supports the model option, where you can pass the class name to store your mail. Thus, only the creation of your custom model will take effect.

Update status field instead of deleting a queue item when sending

Override the queueMessage() and flushQueue() methods in your class and access the Swift_DoctrineSpool in the symfony API .

Hope this helps.

+6
source

All Articles