Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Sending Emails from ServiceNow PDI to a Personal Email (Gmail)

TharaS657398130
Giga Guru

If you find this content helpful please upvote, thank you

 

When working in a ServiceNow Personal Developer Instance (PDI), outbound email is not configured by default. To send emails (for notifications, testing, or workflows), you need to set up an SMTP server.

SMTP (Simple Mail Transfer Protocol) is the standard protocol used to send emails across the internet.

In ServiceNow:

SMTP acts as the outbound email gateway

Without it, the instance cannot send emails externally PDIs do not come preconfigured with SMTP for security reasons

 

Step1. Create and Configure SMTP Email Account

Navigate to: System Mailboxes → Email Accounts

Click New Fill in the required details as it is (refer to screenshot below)

Prerequisite:

Enable 2-Step Verification on your Gmail account which you have provided in the user name Go to the App Passwords page using below link to generate a 16-digit password which you will be pasting in the password field. Do not use your actual Gmail password!!! (Refer to screenshot attached)
https://security.google.com/settings/security/apppasswords

Log in with your Gmail account, create a dummy test name and it will generate a 16-digit password.

After pasting the 16-digit password, save the record.

Click Test Connection Verify that the status shows Connection Successful

If successful, the instance is ready to send emails.

 

Step2. Enable Outbound Email in System Properties

Navigate to: System Properties → Email Properties

Enable the following:

Check Enable email sending under Outbound Email Configuration   There is an option to specify a default recipient email address   If configured, all outgoing emails may be redirected to that address

For our usecase, We want emails to be sent based on specific configurations, not globally overridden so you can leave the field blank. (Refer to screenshot attached)

 

Step3. Configure Notification and Recipients

Example use case:

Send an email when an Incident is created with Category = Network Under Who will receive tab add recipient using the Email address (Mailbox field) This ensures emails are sent only for the defined condition Test the Setup and Verify Email Delivery

Trigger the notification and navigate to System Mailboxes → Outbox and confirm that the email record is created.

Open your personal gmail inbox and verify that the email is received.

2 ACCEPTED SOLUTIONS

Hey!

So yeah in real project environment when your business provides you the instance along with that they also provide you a SMTP and POP server which you can later configure it according to your needs.

View solution in original post

Good Question!

You can use this approach for PDI/Dev/Testing instances, but not recommended for Staging/Production instances. 

 

The main reason we are using APP Password is for security purposes only. It uses a seperate 16-digit credential so that your main password is not exposed. Also, it requires 2FA enabled.

 

Again, your production instances(considering it a business requirement) will have SMTP server included so you wont be needing to give your personal credentials

View solution in original post

5 REPLIES 5

AnjaliK64227824
Tera Contributor

In a real project environment, do we still need to configure SMTP manually like this, or is it usually pre-configured by the organization?

Hey!

So yeah in real project environment when your business provides you the instance along with that they also provide you a SMTP and POP server which you can later configure it according to your needs.

AnjaliK64227824
Tera Contributor

Are there any security risks in using Gmail SMTP with App Passwords for a PDI, and is this approach recommended for production environments?

Good Question!

You can use this approach for PDI/Dev/Testing instances, but not recommended for Staging/Production instances. 

 

The main reason we are using APP Password is for security purposes only. It uses a seperate 16-digit credential so that your main password is not exposed. Also, it requires 2FA enabled.

 

Again, your production instances(considering it a business requirement) will have SMTP server included so you wont be needing to give your personal credentials