# Variable in email subject

**URL:** <https://kanboard.discourse.group/t/variable-in-email-subject/1591>\
**Category:** Open Discussions\
**Created:** [December 30, 2020, 1:02pm UTC](https://kanboard.discourse.group/t/variable-in-email-subject/1591 "2020-12-30T13:02:47Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![MatzeMuc86](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/matzemuc86/32/755_2.png) [@MatzeMuc86](https://kanboard.discourse.group/u/MatzeMuc86)\
**Post date:** [December 30, 2020, 1:02pm UTC](https://kanboard.discourse.group/t/variable-in-email-subject/1591/1 "2020-12-30T13:02:47Z")

</div>

Dear community,

I am wondering if I can use variables as part of the email subject. The actions allow me to choose a custom subject. Nevertheless my email client groups mails with the same title, hence I have to be quite careful to not oversee any mail. Idea could be to add the task title, e.g. "New task "

Off topic: I solved some other topic but I am blocked to reply to the same threat due to my newbe status. Any idea how to chance this as I like to share solutions with the community as well.

Thanks and best  
MatzeMuc86

---

<div class="post-metadata">

**Author:** ![creecros](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/creecros/32/156_2.png) [@creecros](https://kanboard.discourse.group/u/creecros)\
**Post date:** [December 30, 2020, 6:21pm UTC](https://kanboard.discourse.group/t/variable-in-email-subject/1591/2 "2020-12-30T18:21:18Z")

</div>

which emails, in particular?

---

<div class="post-metadata">

**Author:** ![MatzeMuc86](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/matzemuc86/32/755_2.png) [@MatzeMuc86](https://kanboard.discourse.group/u/MatzeMuc86)\
**Post date:** [December 30, 2020, 7:09pm UTC](https://kanboard.discourse.group/t/variable-in-email-subject/1591/3 "2020-12-30T19:09:15Z")

</div>

I use automatic actions for different things, e.g.

> Send a task by email to assignee  
> Event name = Task creation  
> Column = Ideen  
> Email subject = Neue Aufgabe

Instead if “Neue Aufgabe” I would prefer a task specific email subject, e.g. “Neue Aufgabe: Update Kanboard (#999)”

Any idea?

Thanks and best  
Matthias

---

<div class="post-metadata">

**Author:** ![creecros](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/creecros/32/156_2.png) [@creecros](https://kanboard.discourse.group/u/creecros)\
**Post date:** [December 31, 2020, 3:05am UTC](https://kanboard.discourse.group/t/variable-in-email-subject/1591/4 "2020-12-31T03:05:52Z")

</div>

totally doable. are you comfortable editing the action? or do you need help?

actually, I just noticed thats one of my actions. ill add an option to include the task title to the end like that for you, next week, when I’m off Vacation.

---

<div class="post-metadata">

**Author:** ![MatzeMuc86](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/matzemuc86/32/755_2.png) [@MatzeMuc86](https://kanboard.discourse.group/u/MatzeMuc86)\
**Post date:** [December 31, 2020, 9:11am UTC](https://kanboard.discourse.group/t/variable-in-email-subject/1591/5 "2020-12-31T09:11:47Z")

</div>

Happy to hear and no hurry at all - vacation is important!

I created the actions via the admin browser interface if you mean this. If it is code in the config files: Would be OK but advise would be very helpful in this case. I use different actions and also plugins. Are there limitations or do they somehow use the same technique for email notification?

I do not know about the mid-term plan: Maybe some principle variables might be an interesting approach to make the usage easier for different purposes and different people?

Best and happy NYE!  
MatzeMuc86

---

<div class="post-metadata">

**Author:** ![creecros](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/creecros/32/156_2.png) [@creecros](https://kanboard.discourse.group/u/creecros)\
**Post date:** [December 31, 2020, 3:23pm UTC](https://kanboard.discourse.group/t/variable-in-email-subject/1591/6 "2020-12-31T15:23:54Z")

</div>

what ill do is edit the code to present a checkbox option, allowing you to include the task title in the subject. so when you set up the action, the options presented would look like the below

```auto
Send a task by email to assignee
Event name = Task creation
Column = Ideen
Email subject = Neue Aufgabe
Include task title = true

```

if `Include task title` is true then the subject result will be like you requested, `Neue Aufgabe: Task title(#111)`

else it will be like previously.

you can then look at the commit, and see what code was added, and how it works, to apply to other actions that you use.

---

<div class="post-metadata">

**Author:** ![MatzeMuc86](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/matzemuc86/32/755_2.png) [@MatzeMuc86](https://kanboard.discourse.group/u/MatzeMuc86)\
**Post date:** [January 8, 2021, 7:46am UTC](https://kanboard.discourse.group/t/variable-in-email-subject/1591/7 "2021-01-08T07:46:31Z")

</div>

Dear Creecros,

any news yet?

Thanks and best  
MatzeMuc86

---

<div class="post-metadata">

**Author:** ![creecros](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/creecros/32/156_2.png) [@creecros](https://kanboard.discourse.group/u/creecros)\
**Post date:** [January 8, 2021, 1:03pm UTC](https://kanboard.discourse.group/t/variable-in-email-subject/1591/8 "2021-01-08T13:03:23Z")

</div>

maybe today. crusader kings 3 has ruled my free time as of late.

---

<div class="post-metadata">

**Author:** ![creecros](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/creecros/32/156_2.png) [@creecros](https://kanboard.discourse.group/u/creecros)\
**Post date:** [January 8, 2021, 5:05pm UTC](https://kanboard.discourse.group/t/variable-in-email-subject/1591/9 "2021-01-08T17:05:37Z")

</div>

> <https://github.com/creecros/SendEmailCreator/commit/a2c1cb2455febfa6d30cd9a5643509e228a0960b>

You get to test it, I don’t really have the time.

---

<div class="post-metadata">

**Author:** ![MatzeMuc86](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/matzemuc86/32/755_2.png) [@MatzeMuc86](https://kanboard.discourse.group/u/MatzeMuc86)\
**Post date:** [January 10, 2021, 6:38pm UTC](https://kanboard.discourse.group/t/variable-in-email-subject/1591/10 "2021-01-10T18:38:11Z")

</div>

thank you a lot - increadible service!

I replaced the 4 files withing the plugin folder and restarted kanboard. Nevertheless I now get a strange error page when entering the kanboard main page. When replacing with the original files everything works again.

 ![2021-01-10 19_35_24-SendEmailCreator_Plugin.php at master · creecros_SendEmailCreator](https://global.discourse-cdn.com/free1/uploads/kanboard1/original/1X/7c05f9f0f8f186b58cde9a6f23d8068b7d34a7b4.jpeg)

---

<div class="post-metadata">

**Author:** ![creecros](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/creecros/32/156_2.png) [@creecros](https://kanboard.discourse.group/u/creecros)\
**Post date:** [January 11, 2021, 12:56pm UTC](https://kanboard.discourse.group/t/variable-in-email-subject/1591/11 "2021-01-11T12:56:37Z")

</div>

what was error, can you post a screenshot? also, try actually installing it from the master.

and, remove your old actions, they will be missing variables for the new action.

---

<div class="post-metadata">

**Author:** ![MatzeMuc86](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/matzemuc86/32/755_2.png) [@MatzeMuc86](https://kanboard.discourse.group/u/MatzeMuc86)\
**Post date:** [January 12, 2021, 2:56pm UTC](https://kanboard.discourse.group/t/variable-in-email-subject/1591/12 "2021-01-12T14:56:54Z")

</div>

I fully re-placed the plugin. Kanboard itself works. I also checked that the downloaded master contains the mentioned changes.  
Unfortunately if I try to create a new proper action, there is no field to select to include the task title to the subject (see screenshot).

 ![2021-01-12 15_53_58](https://global.discourse-cdn.com/free1/uploads/kanboard1/original/1X/8a97ea3d36d3df31ffe93d20a6562b220cc83c99.jpeg)

---

<div class="post-metadata">

**Author:** ![creecros](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/creecros/32/156_2.png) [@creecros](https://kanboard.discourse.group/u/creecros)\
**Post date:** [January 12, 2021, 4:27pm UTC](https://kanboard.discourse.group/t/variable-in-email-subject/1591/13 "2021-01-12T16:27:07Z")

</div>

You are caching php on your server. reboot your server hosting kanboard.

 ![image](https://global.discourse-cdn.com/free1/uploads/kanboard1/original/1X/ff87482fdd161d1e851693a916f8014b3943fbf6.png)

---

<div class="post-metadata">

**Author:** ![MatzeMuc86](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/matzemuc86/32/755_2.png) [@MatzeMuc86](https://kanboard.discourse.group/u/MatzeMuc86)\
**Post date:** [January 12, 2021, 6:47pm UTC](https://kanboard.discourse.group/t/variable-in-email-subject/1591/14 "2021-01-12T18:47:24Z")

</div>

Thank you for the hint - works!  
I regenerated my actions, perfect; thank you!  
As I use Greenwing theme I added a issue to support the checkbox. Currently I just have to enter “yes” into the text field: [Support for Check box "Include Task Title and ID in subject line?" for "Auto Email Extended Actions" Plugin · Issue #36 · Confexion/Greenwing · GitHub](https://github.com/Confexion/Greenwing/issues/36)

Best  
MatzeMuc86

---

<div class="post-metadata">

**Author:** ![MatzeMuc86](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/matzemuc86/32/755_2.png) [@MatzeMuc86](https://kanboard.discourse.group/u/MatzeMuc86)\
**Post date:** [January 12, 2021, 6:55pm UTC](https://kanboard.discourse.group/t/variable-in-email-subject/1591/15 "2021-01-12T18:55:12Z")

</div>

I added a German translation as well (first time to contribute to github ;-)).  
Unfortunately I had a missing comma here: [Comparing creecros:master...MatzeMuc86:patch-1 · creecros/SendEmailCreator · GitHub](https://github.com/creecros/SendEmailCreator/compare/master...MatzeMuc86:patch-1)  
patch-2 should be fine: [Comparing creecros:master...MatzeMuc86:patch-2 · creecros/SendEmailCreator · GitHub](https://github.com/creecros/SendEmailCreator/compare/master...MatzeMuc86:patch-2)  
I could not find out how to correct / delete.

---

<div class="post-metadata">

**Author:** ![MatzeMuc86](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/matzemuc86/32/755_2.png) [@MatzeMuc86](https://kanboard.discourse.group/u/MatzeMuc86)\
**Post date:** [January 17, 2021, 11:53am UTC](https://kanboard.discourse.group/t/variable-in-email-subject/1591/16 "2021-01-17T11:53:58Z")

</div>

Any chance to add the same option to include title into mail subject for overdue mail notification?

Best  
MatzeMuc86

---

<div class="post-metadata">

**Author:** ![creecros](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/creecros/32/156_2.png) [@creecros](https://kanboard.discourse.group/u/creecros)\
**Post date:** [January 17, 2021, 5:38pm UTC](https://kanboard.discourse.group/t/variable-in-email-subject/1591/17 "2021-01-17T17:38:53Z")

</div>

yes, next chance I get, for some reason I thought it already did. not sure why I thought that…

edit: I will add like I did the others, but after checking, if you leave the subject blank, it will defualt to include project name, task title, due in.

---

<div class="post-metadata">

**Author:** ![SaGrLand](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/sagrland/32/896_2.png) [@SaGrLand](https://kanboard.discourse.group/u/SaGrLand)\
**Post date:** [May 23, 2021, 9:09am UTC](https://kanboard.discourse.group/t/variable-in-email-subject/1591/18 "2021-05-23T09:09:06Z")

</div>

Is it possible to get SendEmail to assignee on creation/change… für Subtasks?

---

<div class="post-metadata">

**Author:** ![creecros](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/creecros/32/156_2.png) [@creecros](https://kanboard.discourse.group/u/creecros)\
**Post date:** [May 24, 2021, 10:19pm UTC](https://kanboard.discourse.group/t/variable-in-email-subject/1591/19 "2021-05-24T22:19:45Z")

</div>

send an email to subtask assignee on subtask creation/change?

as is, no.

---

<div class="post-metadata">

**Author:** ![aljawaid](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/aljawaid/32/1090_2.png) [@aljawaid](https://kanboard.discourse.group/u/aljawaid)\
**Post date:** [February 10, 2023, 1:04pm UTC](https://kanboard.discourse.group/t/variable-in-email-subject/1591/20 "2023-02-10T13:04:47Z")

</div>

I wrote this for an upcoming plugin which you may find useful. It is part of the core for the specified action.

 ![image](https://global.discourse-cdn.com/free1/uploads/kanboard1/original/2X/c/cdeb94b594576c914239456e3d60e93b1baf3a1b.png)

[Next page](https://kanboard.discourse.group/t/variable-in-email-subject/1591.md?page=2)
