Help with the error: Response status code does not indicate success: 400 (Bad Request)

Hi, I’m trying to create a sequence that sends notification emails to some contacts with information, but when I run the program I get this error.

in Main.xaml
at SendEmailNotification “Send Email Notification”
at Sequence “Then”
at If “If”
at Sequence “Body”
at ForEachRow “For Each Row in Data Table”
at Sequence “Main Sequence”
at Main “Main”

System.Net.Http.HttpRequestException: Response status code does not indicate success: 400 (Bad Request).
at UiPath.Core.Activities.ForEachBase`1.OnExecutionFaulted(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Hi @dgavilanez

Are you able to please share more details on this?

if you can share screenshot of your workflow and configuration of your send mail activity, that would be helpful.

Also, how are trying to run this process? from studio or orchestrator?

@dgavilanez

Can you please show a screenshot of the activity

cheers

I’m experiencing the same issue. When I execute the send mail object and correctly configure the to, subject, and body fields, I get the following output: “Send Email Notification: Response status code does not indicate success: 400 (Bad Request).”

Can you help me determine if this is a bug in the current version or if there’s something missing in the configuration?

I encounter the same issue. I also get the same response. Anyone has a solution yet? I use UiPath.System.Activities 25.10.4.

Send Email Notification: Response status code does not indicate success: 400 (Bad Request).

Hi @14e78ed533710b6e301d142ef

The error comes 400 because Orchestrator email is not configured.
Once SMTP is set, error will be gone.
Please follow the steps to configure SMtP

  1. Open UiPath Orchestrator
  2. Go to Tenant → Settings → Email
  3. Turn ON “Enable Email Notifications”
  4. Enter SMTP details
    (example for Outlook):

Server: smtp.office365.com
Port: 587
Security: STARTTLS
Username & Password: mail account details
From Address: same email id

  1. Click Save
  2. Restart Orchestrator services (if On-Prem)
  3. Run the job again

Or you can use Send Outlook Mail Message activity and Send SMTP Mail Message Activity that will work without email setting

If solutions works for you please mark as solved or let us know if u face any issue

Thanks & Happpy Automations

Hi @sbeukema

I send the approach below please try and let me know if you still face issue

Thanks

Hi @sbeukema
If solution works for you please mark as solved so thread will be closed
Thanks

We don’t get a 404 error, but a 400 error.
Thereby, we have the Mail settings set to ‘Use default mail settings’ as set by orchestrator. None of it is editable.

UiPath is able to send email notification from the alerts panel. Don’t know if this setting is related to the SendEmailNotification activity. These are the settings from the manage notification panel in the current tenant:

Hi @dgavilanez

A 400 Bad Request in Send Email usually means the request is malformed. Common causes:

  • Invalid or blank email addresses in your DataTable
  • Special characters or malformed HTML in the subject/body
  • Wrong SMTP/Outlook settings

Fix:

  • Validate email addresses before sending
  • Test sending a simple email first
  • Wrap Send Email in Try-Catch to handle errors per row

Orchestrator notification mail settings are only used for alerts.
Send Email activities do not consume these settings, so relying on “default mail settings” causes a 400 error. SMTP or mail integration must be configured explicitly in the workflow.

Here are some causes for the issue:

  1. Email Server Settings: Ensure that the email server settings are correct and that the email server is properly configured. You can verify this by going to the “Settings” page in Orchestrator, selecting “Mail”, and checking that the SMTP settings are correct.
  2. Email Delivery Settings: Check if the email delivery settings are properly configured in Orchestrator. This includes verifying the SMTP server, port, username, and password
  3. Email Activity Execution: It’s possible that the email activity is not being executed when the process is run from Orchestrator. You can check this by reviewing the logs in Orchestrator for any errors or warnings related to the email activity.
  4. Email Credentials and Assets: If you’re using credentials and assets stored in Orchestrator for the email activity, ensure that these are correctly configured and accessible by the process when it’s run from Orchestrator.
  5. Email Alerts Configuration: If you’re relying on Orchestrator to send email alerts, ensure that these are properly configured. This includes setting up the SMTP server for email notifications and enabling the necessary alert types.
  6. Permissions: Ensure that the robot has the necessary permissions to execute the email activity when the process is run from Orchestrator.

Apart from these, can you please attach your unattended log and also verify if the SMTP port are allowed inbound/outbound on unattended bot machine. If you are using MS package, then there might be different issues.

Apologies its autocorrect I’m taking about 400 only

The Orchestrator Alerts / Manage Notifications mail settings are only used for system notifications and are not shared with workflow activities like Send Email Notification. That is why alerts work, but the activity still requires its own SMTP or Integration Service configuration.
To fix this, configure Integration Service or set SMTP at tenant or machine level.

Hope it helps

In the UiPath Documentation about ‘Send Email Notification’ is stated:

Description

The Send Email Notification activity uses UiPath Notification Service to send an alert via email to a list of recipients.

So I don’t understand where or why I need to configure my own SMTP service. Based on the documentation I understand that it should be handled by UiPath somewhere.

The Send Email Notification activity only triggers UiPath Notification Service.In Automation Cloud, UiPath already provides an email delivery service, so users do not need to configure SMTP.

In On-Prem Orchestrator, UiPath does not provide any email server, therefore SMTP configuration is mandatory.

I hope it will help now

We are using Automation Cloud, so therefore we should use the provided email delivery service.
I also found these Release notes where UiPath talks about the elimination of configuring external email servers.
So I still don’t understand why it is not working out of the box for me. Any other suggestions?

Could you please share me the screenshot of properties? So I can help you

Hereby the screenshot with the settings of the activity. The ‘To’ is a valid recipient

check if the password isn’t expired or test it by using the same credentials you are able to send email or not.

with which password or credentials? This activity doesn’t need any authentication or SMTP configuration. As shown in the screenshot there is no password/credential area.

Got it.

“default” SMTP isn’t fully usable for certain email scenarios.

When you are using the custom mail settings it works ? in other email activities