Issue with email deliverability in Data Services

Hello,
Please could you advise on what settings am i missing. The Dataservices version is 14.2.7

I am trying to send out an email from my etl as the last step in the process, so i have the below command in a script file.

print( ‘<<<begin’);
$email = smtp_to( ‘myemail@companyname.com’ , ‘Job completed’, ’ ',0,0 );
print( ‘>>>end’);

Under the DataServices Server Manager> Miscellaneous…
the server name is the host of our Office 365. This is the same value in the Host of the Adaptive Job Server > Email Destination in CMC (and this works as we get the reports from Webi). The sender is my email as above.

The $email is set as a varchar(500) variable.

But the job fails as below.
“Failed to communicate with SMTP server on command. No recipients were valid or did not resolve to any address. No Message was sent. Please try to run it manually to see the actual invalid recipients.”

I am sending the email to myself from Dataservices and the server/host works in CMC for Webi, but not sure what is causing it to fail in Dataservices.
Any recommendations please?

Hello,

Could this be Firewall/Network related? Can you ping your SMTP server from your DS server?