SMTPSender: no recipients, email send ignored even with a recipient

JensHappeningIT
Giga Guru

Hi everyone,

 

I am getting this weird error when I try to send an email with ServiceNow can you help me? I get the error "SMTPSender: no recipients, email send ignored" even with a recipient. My SMTP and POP3 are connected and show no errors

Screenshot 2023-10-20 140310.png

Screenshot 2023-10-20 135520.png

1 ACCEPTED SOLUTION

I found the answer to my problem, I can send my emails now with:

var emailOutbound = new GlideEmailOutbound();

// Set the recipient email address
emailOutbound.addRecipient('exampleRecipient@gmail.com');

// Set the sender email address
emailOutbound.setSender('exampleSend@gmail.com');

// Set the subject of the email
emailOutbound.setSubject('Hello from ServiceNow');

// Set the body of the email
emailOutbound.setBody('This is the body of the email.');

emailOutbound.save();

View solution in original post

7 REPLIES 7

Jaspal Singh
Mega Patron
Mega Patron

Hi,

Is this for PDI or business instance?

It is for a PDI

Did you check for Email Accounts and do a Test connection?

Also, cna you try changing the From to  something as below

<instancename>@servicenowdevelopers.com