mailto.unsatisfied - how to change the mailto address when user clicks the link?

Chase Stevenson
Mega Guru

Hello, the "incident resolved" notification has a line in the message HTML (${mailto:mailto.unsatisfied}) that is calling an email template named "mailto.unsatisfied".

When you click this link in the generated email notification, the "To:" in the new email automatically fills in with a hard-coded email address of the instance. I cannot find where it is pulling this address from though.

We want to change this address depending on incident company and set the address to the company's email address.

Where is this email address value coming from? The email template named mailto.unsatisfied has nothing in it to indicate which address to use:

find_real_file.png

4 REPLIES 4

Alexander Grisb
Kilo Guru

When the user clicks on the link, it should autofill it with the URL of the instance. I believe if there is a mail to and a webaddress, the email client treats that as mail to -> this address and ServiceNow will take care of the rest when it parses the email.

 

I would ditch this altogether and create an email script that does what you are looking for, as it would offer more control over that. 

 

If this answer was helpful, please mark it as such.

Alexander, thanks for you response - you mention "if there is a mail to and a webaddress, the email client treats that as mail to -> this address and ServiceNow will take care of the rest when it parses the email."

I'm confused by this as there is no "mailto" or "webaddress" in the mailto.unsatisfied template that I can see.

The mailto link in the generated email is created with the mailto being pointed directly to what looks to be the "From" value on the email account SMTP record in ServiceNow:

find_real_file.png

 

find_real_file.png

The problem with this behavior is that for incidents where company = "xyz", we want this mailto: address to be different than the one in the "From" value on the email account SMTP record in ServiceNow.

So where you are hovering over, it says mailto:instance@service-now. That's specifically in the email client in HTML, and I believe it was designed that way for security purposes.

The way to do this would be to embed something like this in an email script:

<a href="mailto:name@email.com">Link text</a>

If you populate this with the email, it will provide the solution you are looking for.

You may have to make something more complicated than that, with an Inbound Email action parsing whatever email you are sending if there are other requirements.

I've looked further into this, and it appears the mailto: value is being pulled from the "From" field on the servicenow SMTP email account record:

find_real_file.png

 

When I hover over the link in production, the link shows "mailto: servicedesk@"

find_real_file.png

Can you recommend where I would put that HTML line that you posted?

There's the notification, notification calls the email template ${mailto:mailto.unsatisfied}, and by default, the email template ${mailto:mailto.unsatisfied} appears to default the mailto value as the From in email account record.