Client template - from field set to "javascript:gs.getUser().email"

MKelly83
Giga Expert

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?

1 ACCEPTED SOLUTION

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


View solution in original post

8 REPLIES 8

Hi,



gs.getUser().getEmail()


Put this in logs. I think it is not returning value.



Thanks


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


Thanks David



This works "javascript:gs.getUserDisplayName() " only looks like you can't change the email address to who triggered the mail has to be the default email address.



Any idea why?


Hmm i'm not sure, perhaps try removing the space:



javascript:gs.getUserDisplayName()+"<"+ gs.getUser().getEmail()+">"



I'm not sure if that will make a difference but i did find the setFrom syntax quite particular when i was configuring my notifications and this is using the same syntax.