Skip to main content
Jamf Nation, hosted by Jamf, is the largest Apple IT management community in the world. Dialog with your fellow IT professionals, gain insight about Apple device deployments, share best practices and bounce ideas off each other. Join the conversation.

Sending Emails via JSS

Im curious is there away to put variables in a email. For example. I want to say something like this.

Records show you have %computername%. If you still have this computer please plug it into the network so it can get updates.

Like Comment
Order by:
SOLVED Posted: by emily

Computer name is one of the default variables in the JSS. So it would just be $2.

I have a policy in our Self Service app that helps a user auto-generate a help desk ticket by opening their default mail client. The subject is:

"Hello, my username is $3 and my computer's name is $2. I need help with ... "

Like
SOLVED Posted: by EliasG

@emilykausalik how did you do that?

Like
SOLVED Posted: by emily

I created a Self Service policy that runs this script:

#!/bin/sh

#  SendHelpDeskRequest.sh
#  Opens user's default mail client to send an email to the HelpDesk. Hooray automation!
#
#  Created by Emily Kausalik on 10/3/14.
#  

# getting user information
# default parameters from the JSS
computername=$2
username=$3

# set email information
subject="Request Subject"
body="Hello, my username is $3 and my computer's name is $2. I need help with ... "

# send email through default mail client
open "mailto:helpdesk@awesomecompany.com?subject=$subject&body=$body"

All is does is create a draft email in the default client on the machine. It gets the ball rolling.

Like
SOLVED Posted: by sgoetz

Thank you for that information. That works if you are using a script to do that. However, I am using the GUI version to send the email via JSS. For example. Do a search for a criteria, click Actions \- > Click Send Email -> Right email with variables.

Like
SOLVED Posted: by mm2270

Don't think there's a way to do it by using the GUI method from the JSS. I think that simply sends out a statically messaged email to the user who is defined in the Location setting for the Mac.

Just curious, but if you're locating these Macs via search, you could also build a quick Smart Group using the same criteria and add them to a one time policy that uses a scripted method. Or better yet, if its something that you want automated, set up a once per computer policy, so when a Mac falls into that group, they get sent an email. That would make more sense to me on the surface. Is there a requirement to do a manual search and email blast?

Like
SOLVED Posted: by sgoetz

Thank you guys, looks like I will have to go the script route. I was just hoping the GUI part worked, that way I don't have to always write a different script everytime my comm. dept wants to send out some email to our mac users. So I was just going to give them access via the GUI to do it.

Like
SOLVED Posted: by mm2270

You might want to look at the thread on this older Feature Request.
https://jamfnation.jamfsoftware.com/featureRequest.html?id=611
Some ideas are tossed around on how to get the client to email themselves (but appear as if coming from something else) when they become part of a Smart Group. It might help.

Like