i have a trigger that will send a mail when an asset is updated.
the problem is i cant also send the current user's names to the email's content.
i am using %current_user% keyword to display it but doesnt work is there any other keyword?
You should be using %globals_user_attribute_username% to get the username of the current asset. You could also use %globals_user_attribute_first_name% and %globals_user_attribute_last_name% to get their first and last name values. For the email address, you can use %globals_user_attribute_email%
it still doesnt work either. some keywords like %asset_name% displayed but not those keywords (%globals_user_attribute_username%).
I don't think global keywords work in the email trigger action.
The only keywords you can use are the standard asset keywords, and they only replace data for the asset the event is fired on. So in this case, %asset_name% would be replaced by the name of the asset that was updated, rather than the current user. If the event was "user asset created" then %asset_name% would print the name of the user that was created.
[quote]I don't think global keywords work in the email trigger action.
The only keywords you can use are the standard asset keywords, and they only replace data for the asset the event is fired on. So in this case, %asset_name% would be replaced by the name of the asset that was updated, rather than the current user. If the event was "user asset created" then %asset_name% would print the name of the user that was created.[/quote]
but the trigger is for updated standard page assets…
does that means that we cant really display the current user that fired the trigger to send the mail?
I don't know of a keyword that will do it.
I have not tested, but i guess u can,
For name: %asset_updated_by_name%
For email address: no need to use keyword but tick the option "Active User Recipient - Send to active user"?
Robin ;)’ /> <img src=‘http://forums.matrix.squiz.net/public/style_emoticons/<#EMO_DIR#>/wink.gif’ class=‘bbc_emoticon’ alt='![]()
11.jpg (25.6 KB)
[quote]I have not tested, but i guess u can,
For name: %asset_updated_by_name%
For email address: no need to use keyword but tick the option "Active User Recipient - Send to active user"?
Robin ;)’ /> <img src=‘http://forums.matrix.squiz.net/public/style_emoticons/<#EMO_DIR#>/wink.gif’ class=‘bbc_emoticon’ alt=';)[/quote]
it displayed something but not the exact user's name which is weird
It may display the person's name who updated that page. Sorry I didn't catch your question properly. Is your scenario like the below?
Page A, a visitor B and the person C who updated the page.
Are you after a solution that,
When page A is udpated, user B(B is currently browsing page A) will receive an email with content like "dear B, blah blah"?
:blink:’ /> <img src=‘http://forums.matrix.squiz.net/public/style_emoticons/<#EMO_DIR#>/blink.gif’ class=‘bbc_emoticon’ alt=':blink:
Asking an additional question on this thread topic, rather than creating a new one…
Is there any specific setup for mail that needs to be done when a new Matrix system is created? I am not getting any mail that is suppose to be sent by a trigger, or any system config. type emails. Did I miss a step?
Probably this isn't your problem, but we had the same symptoms and the cause was our MX record. Maybe check out your network's mail settings?
No, it was my fault. I had not installed or configured php sendmail. Works now. :)
Back to the same problem :(. I upgraded to 3.18.5 and I no longer am getting any mail. I had a form set up which would send me an email as well as triggers. Now when testing both I am not getting any email.
Is there some default mail for linux that I have missed? I added php sendmail a while back...
What does /var/log/maillog say?
This looks to be the log from the custom form email that should have been sent:
[codebox]
Sep 3 04:22:12 (none) sendmail[17558]: m834MCNc017558: to=nnhubbard@puc.edu, ctladdr=nnhubbard@puc.edu (33/33), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31264, re
lay=[127.0.0.1] [127.0.0.1], dsn=5.0.0, stat=Service unavailable
Sep 3 04:22:12 (none) sendmail[17558]: m834MCNc017558: m834MCNd017558: DSN: Service unavailable
Sep 3 04:22:12 (none) sm-mta[17559]: m834MCH9017559: localhost [127.0.0.1] did not issue MAIL/EXPN/VRFY/ETRN during connection to MSP-v4
Sep 3 04:22:12 (none) sm-mta[17560]: m834MCFM017560: localhost [127.0.0.1] did not issue MAIL/EXPN/VRFY/ETRN during connection to MSP-v4
Sep 3 04:22:12 (none) sendmail[17558]: m834MCNd017558: to=nnhubbard@puc.edu, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32288, relay=[127.0.0.1] [127.0.0.1], dsn=5.
0.0, stat=Service unavailable
Sep 3 04:22:12 (none) sendmail[17558]: m834MCNd017558: m834MCNe017558: return to sender: Service unavailable
Sep 3 04:22:12 (none) sm-mta[17561]: m834MCr6017561: localhost [127.0.0.1] did not issue MAIL/EXPN/VRFY/ETRN during connection to MSP-v4
Sep 3 04:22:12 (none) sendmail[17558]: m834MCNe017558: to=postmaster, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=33312, relay=[127.0.0.1] [127.0.0.1], dsn=5.0.0, st
at=Service unavailable
Sep 3 04:22:12 (none) sendmail[17558]: m834MCNd017558: Saved message in /var/lib/sendmail/dead.letter
Sep 3 04:22:12 (none) sendmail[17562]: m834MCM8017562: Authentication-Warning: (none): www-data set sender to nnhubbard@puc.edu using -f
Sep 3 04:22:12 (none) sendmail[17562]: m834MCM8017562: from=nnhubbard@puc.edu, size=1232, class=0, nrcpts=1, msgid=<200809030422.m834MCM8017562@(none)>, relay=www-data@loca
lhost
Sep 3 04:22:12 (none) sm-mta[17563]: m834MCIA017563: localhost [127.0.0.1] did not issue MAIL/EXPN/VRFY/ETRN during connection to MSP-v4
Sep 3 04:22:12 (none) sendmail[17562]: m834MCM8017562: to=nnhubbard@puc.edu, ctladdr=nnhubbard@puc.edu (33/33), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31232, re
lay=[127.0.0.1] [127.0.0.1], dsn=5.0.0, stat=Service unavailable
Sep 3 04:22:12 (none) sendmail[17562]: m834MCM8017562: m834MCM9017562: DSN: Service unavailable
Sep 3 04:22:12 (none) sm-mta[17564]: m834MCWA017564: localhost [127.0.0.1] did not issue MAIL/EXPN/VRFY/ETRN during connection to MSP-v4
Sep 3 04:22:12 (none) sendmail[17562]: m834MCM9017562: to=nnhubbard@puc.edu, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32256, relay=[127.0.0.1] [127.0.0.1], dsn=5.
0.0, stat=Service unavailable
Sep 3 04:22:12 (none) sendmail[17562]: m834MCM9017562: m834MCMA017562: return to sender: Service unavailable
Sep 3 04:22:12 (none) sm-mta[17565]: m834MCXn017565: localhost [127.0.0.1] did not issue MAIL/EXPN/VRFY/ETRN during connection to MSP-v4
Sep 3 04:22:12 (none) sendmail[17562]: m834MCMA017562: to=postmaster, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=33280, relay=[127.0.0.1] [127.0.0.1], dsn=5.0.0, st
at=Service unavailable
Sep 3 04:22:12 (none) sendmail[17562]: m834MCM9017562: Saved message in /var/lib/sendmail/dead.letter
[/codebox]
Do you have an SMTP server running on your machine? You're getting service unavailable messages, which indicates the underlying SMTP system is not able to send outbound mail. However, Matrix is successfully delivering the message to the SMTP system itself.
Thanks Avi, I miss you answering my questions!
Honestly, I am pretty rusty when it comes to server stuff, so I forget the small things. I added postfix and I am now getting mail. Thanks for the help!
Heh, I had an hour to kill while my DRBD cluster replicated. ;)
I am ashamed to say, I am having this problem again. It seems like it happens every time I upgrade matrix, it seems like my mail does not work anymore. Triggers, and custom forms don't send mail.
I tried reinstalling postfix, but I am still getting errors, saying that it does not know the user. Does anyone know how to get this thing working and not break every time?
Here is what I get in the logs when I try to send a custom form to myself:
Nov 5 06:32:28 (none) postfix/pickup[2008]: 1035D28225: uid=33 from=
Nov 5 06:32:28 (none) postfix/cleanup[11946]: 1035D28225: message-id=<20081105063228.1035D28225@matrix>
Nov 5 06:32:28 (none) postfix/qmgr[2009]: 1035D28225: from=, size=1372, nrcpt=1 (queue active)
Nov 5 06:32:28 (none) postfix/local[11957]: 1035D28225: to=, relay=local, delay=0.18, delays=0.09/0/0/0.1, dsn=5.1.1, status=bounced (unknown user: "nic")
Nov 5 06:32:28 (none) postfix/cleanup[11946]: 2DD0A28226: message-id=<20081105063228.2DD0A28226@matrix>
Nov 5 06:32:28 (none) postfix/qmgr[2009]: 2DD0A28226: from=<>, size=2945, nrcpt=1 (queue active)
Nov 5 06:32:28 (none) postfix/bounce[12046]: 1035D28225: sender non-delivery notification: 2DD0A28226
Nov 5 06:32:28 (none) postfix/qmgr[2009]: 1035D28225: removed
Nov 5 06:32:28 (none) postfix/local[11957]: 2DD0A28226: to=, relay=local, delay=0.02, delays=0.01/0/0/0.01, dsn=5.1.1, status=bounced (unknown user: "form")
Nov 5 06:32:28 (none) postfix/qmgr[2009]: 2DD0A28226: removed
The server thinks it is authorative for zedsaid.com and can't find a user for the email address form@zedsaid.com -- if your mail is hosted on another server, you have to configure Postfix not to think it's authorative. This is out-of-scope of the Matrix forums, though. PM me and I can assist you with it. :)