Hi all,
I have on server bulkmail job (asset to send is "Whats new" asset for
assets newer than 1 day) , bulkmail users (only one group),
subscription page, etc. like is in Bulkmail Manual PDF.
And now I'd like run this bulkmail job every time when any user create
"News Item".
By hand I can change status to live, but I'd like automate this.
It is possible to set status for bulkmail via trigger when news item is created?
Kind regards
Arek
[quote]I have on server bulkmail job (asset to send is "Whats new" asset for
assets newer than 1 day) , bulkmail users (only one group),
subscription page, etc. like is in Bulkmail Manual PDF.
And now I'd like run this bulkmail job every time when any user create
"News Item".
By hand I can change status to live, but I'd like automate this.
It is possible to set status for bulkmail via trigger when news item is created?[/quote]
The Trigger Manager cannot target another asset for a current or future status change. If a Bulkmail Job could be targeted, it would have to be set to "Under Construction" and then "Live" to queue it for sending. Also I am unsure as to what would occur if the job was requeued while sending so I have another recommendation below…
If the targeted group is small, I would recommend using the "Send Email" Trigger Action instead. The email will be sent immediately while the page is being refreshed, hence the recommendation for a small group. This action now provides specification of a design for the asset being sent so it's almost like a Bulkmail Job. This is the only way I can think of at the moment with current functionality.
Edit: Typo "imeediately" :lol:
[quote]The Trigger Manager cannot target another asset for a current or future status change. If a Bulkmail Job could be targeted, it would have to be set to "Under Construction" and then "Live" to queue it for sending. Also I am unsure as to what would occur if the job was requeued while sending so I have another recommendation below…
If the targeted group is small, I would recommend using the "Send Email" Trigger Action instead. The email will be sent immediately while the page is being refreshed, hence the recommendation for a small group. This action now provides specification of a design for the asset being sent so it's almost like a Bulkmail Job. This is the only way I can think of at the moment with current functionality.
Edit: Typo "imeediately" :lol:[/quote]
Hi Mark,
Thank you for reply.
I think it is a small group - at this moment is ~150 addresses.
In a future will be more and more.
I know about send email trigger. I use it often on my servers.
Regards
Arek
Hi again,
Like Mark says I setup trigger for News item, event asset created.
One of actions is send email.
I setup Group Recipients to bulkmail users group
And wheh I finish news item and click commit I have this two
messages:
[codebox]MySource Notice
Trigger Action: trigger_action_send_email Failed [CORE0135]
MySource Warning
FAILURE: Trigger "news" (Trigger# 1), Event "trigger_event_asset_created" broadcast by "g" (Id# 219) [CORE0127] [/codebox]
Any idea what is wrong?
If I setup also
General Email Settings > To > root
I receive receive email for root user.
edit:
I tried use group of bulkmail users in
General Email Settings > to
Nothing wrong in system.log, error.log, apache logs and maillog
but this bulkmail users don't get any email.
Kind regards
Arek
I made next test
I created users group "test_group" with some users asset type "USER"
And if I put this group to field "To", users receive mails.
(MSM 3.20.4)
Regards
Arek
[quote]I made next test
I created users group "test_group" with some users asset type "USER"
And if I put this group to field "To", users receive mails.
(MSM 3.20.4)[/quote]
Hi Arek,
Firstly I'm glad to hear that this is now working. I hadn't realised this - and it's only since a recent query regarding Bulkmail Users and the "Send Email" Trigger Action - that this currently does not support sending to Bulkmail Users. As you have found, Matrix User asset types are currently supported.
[quote]Hi Arek,
Firstly I'm glad to hear that this is now working. I hadn't realised this - and it's only since a recent query regarding Bulkmail Users and the "Send Email" Trigger Action - that this currently does not support sending to Bulkmail Users. As you have found, Matrix User asset types are currently supported.[/quote]
Hi,
Thank you for reply Mark.
At this moment I trying create a trigger for bulkmail jobs.
Maybe someone have info about correct values for atributes for bulkmail job?
I'd like create a trigger which fill attributes. Especially set value for recipients
(bulkmail users group #160), and what to send.
I Set the value of the bulkmail_job attribute recipients to the value 160 but it's not work.
Also I don;t know which atributr is for asset to send.
Any help is appreciated.
Regards 
Arek
[quote]Maybe someone have info about correct values for atributes for bulkmail job?
I'd like create a trigger which fill attributes. Especially set value for recipients
(bulkmail users group #160), and what to send.[/quote]
The attribute "Content Id" is for the asset content to send. The "Recipients" attribute is a serialised PHP array, so it's a bit trickier. The group ID should be given somewhere within the content of this attribute.
I would recommend setting up a Bulkmail Job with the intended configuration in the backend and then obtaining the raw attribute values for the job from the database. A query to obtain the attribute values for asset 123 would be structured as follows:
SELECT a.name, v.custom_val FROM sq_ast_attr a, sq_ast_attr_val v WHERE a.attrid = v.attrid AND v.assetid = 123;
[quote]The attribute "Content Id" is for the asset content to send. The "Recipients" attribute is a serialised PHP array, so it's a bit trickier. The group ID should be given somewhere within the content of this attribute.
I would recommend setting up a Bulkmail Job with the intended configuration in the backend and then obtaining the raw attribute values for the job from the database. A query to obtain the attribute values for asset 123 would be structured as follows:
SELECT a.name, v.custom_val FROM sq_ast_attr a, sq_ast_attr_val v WHERE a.attrid = v.attrid AND v.assetid = 123;[/quote]
Hi Mark,
Thank you for your help.
I checked in DB values for attributes and now I testing trigger 
Kind regards
Arek