
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2017 09:13 AM
I know I can just put a name an address in the From and Reply fields, but I need to pull the user's name that is on my form.
I have created an email script.
I can get the email to show up, but I am unable to replace the 'Display Value'. I want it to pull the persons name and their email.
This is what I am using and I am getting the email to change but I do not know how to get the display name also.
email.setReplyTo(current.u_provisioner.email);
email.setFrom(current.u_provisioner.email);
If I change it to this, then the reply to and from just puts the system emails info.
email.setReplyTo(current.u_provisioner.email, current.u_proivisioner.name);
email.setFrom(current.u_provisioner.email, current.u_proivisioner.name);
I have tested putting in a display value like this, but that does not work either.
email.setReplyTo(current.u_provisioner.email, "my name");
email.setFrom(current.u_provisioner.email, "my name");
I have tried it after the email and in front of the email with no luck.
Any help would be greatly appreciated.
Thanks,
Stacy
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2017 09:34 AM
Use email.setFrom(current.u_provisioner.name+' <'+current.u_provisioner.email+'>');
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2017 09:17 AM
It should be in followng format
email.setFrom("Display Name <some.address @ company.com>");
email.setReplyTo("Display Name <some.address @ company.com>");
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2017 09:32 AM
That works if I have that info, but when I am trying to use variables how do I put that in there?
email.setFrom("current.u_provisioner.name <current.u_provisioner.email>");
I don't think that will work.
Thanks,
Stacy

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2017 09:34 AM
Use email.setFrom(current.u_provisioner.name+' <'+current.u_provisioner.email+'>');
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2017 09:38 AM
You are my hero, thank you 🙂