Skip to content

Add Notify.Email support for emailing all project members#9636

Open
AlexCatarino wants to merge 1 commit into
QuantConnect:masterfrom
AlexCatarino:notify-email-all-project-members
Open

Add Notify.Email support for emailing all project members#9636
AlexCatarino wants to merge 1 commit into
QuantConnect:masterfrom
AlexCatarino:notify-email-all-project-members

Conversation

@AlexCatarino

@AlexCatarino AlexCatarino commented Jul 25, 2026

Copy link
Copy Markdown
Member

Description

Adds engine-side support for sending a Notify.Email notification to all members in the project: passing a null address (Notify.Email(null, ...) / self.notify.email(None, ...)) now means the email is sent to every project member instead of throwing.

Changes

  • NotificationEmail: a null address is allowed and means "all members in the project"; empty or whitespace addresses throw ArgumentException instead of silently falling back; addresses are trimmed before validation.
  • NotificationEmail.Address is always serialized, as null when unset (explicit NullValueHandling.Include), since the cloud API validates the presence of the Address key.
  • NotificationJsonConverter: a missing or JSON-null Address token deserializes to a null address so all-members emails round-trip (a null JToken stringifies to "", which would throw).
  • Docs updated on both NotificationManager.Email overloads and the NotificationEmail constructor.

Testing

  • Unit tests for the null-address semantics, empty-address rejection, Python notifier.email(None, ...) binding, and JSON round-trip without an address.
  • NotificationEmailLiveTests (marked Explicit): enqueues via Notify.Email(null, ...) and sends the dequeued notification through the QuantConnect cloud API (notifications-endpoint, job-user-id and api-access-token config). Verified end-to-end: the API accepts the payload and the email is delivered, including for projects without a live deployment.

A null address now means the email is sent to all members in the
project; the Address key is always serialized (null when unset) since
the cloud API validates its presence. Empty or whitespace addresses
now throw instead of being treated as the default, and addresses are
trimmed before validation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant