
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2018 03:59 AM
Hi All
I have an client template where the from field to set to javascript:gs.getUser().email, The audit trial is being updated and the email is appearing in the outbox as sent however the email is not triggering.
I have selected Yes in the check box for Override the email 'From:' address in the email client. (System Properties > UI Properties).
Do I need to create a mail script and include in client template body?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2018 12:36 AM
Hi Michelle,
Sorry, i mis-read your question, i thought you were adding recipients. You should be able to set the from address using the below syntax in the from field.
javascript:gs.getUserDisplayName()+" <"+ gs.getUser().getEmail()+">"
Set the from address with an email client template
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2018 04:11 AM
Hi Michelle,
You can't dot-walk to user fields using the glide system so gs.getUser().email won't return anything, it doesn't open a glide record it just gives easy access to a few of the logged in users details.
However, you should be able to just put gs.getUser() and the system will send to that users email address automatically.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2018 06:11 AM
Thanks for your reply David
without dot-walking (.email ) it returns a value similar to this "From:com.glide.sys.User@188b4d0" also the same thing is happening logs in the audit trial and is appearing in the outbox as sent but the actual email is never sent.
Audit trial
outbox

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2018 06:19 AM
Hi Michelle,
You have to do some scripting here.
You will have to override it my using mail script.
Use email.setFrom(current.caller_id.email);
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2018 07:10 AM
Thanks Ashutosh
I created the below mail script
(function runMailScript(current, template, email, email_action, event) {
email.setFrom(gs.getUser().getEmail());
}) (current, template, email, email_action, event);
Then called it using ${mail_script:MAIL_SCRIPT_NAME} in the client template but still not working.