Skip to content

Send subject-only email

This operation lets a caller notify a recipient by subject alone — useful when the subject line itself is the message, such as a simple status ping. It resolves the mail service endpoint at call time, picks the HTML or plain-text SOAP method, and always reports success once the SOAP call has been issued.

Field Value
Operation ID MAIL-OP-001
Trigger Caller invokes Mail.SendMail(inToAddress, inFromAddress, inSubject, [isHtml]).
Inputs inToAddress, inFromAddress, inSubject, optional isHtml.
Outputs SOAP dispatch to the legacy mail service; the function returns True.
Primary components Mail.SendMail, SAIFMail.clsSAIFMessage, AppGlobal.EnvironmentService
Entry point SAIF.Framework.Mail\MailServices.vb

Steps

  1. Create a new SAIFMail.clsSAIFMessage SOAP client for this call; no proxy instance is reused across invocations.
  2. Look up the mail endpoint by calling AppGlobal.EnvironmentService.GetConfigSetting("legacyMailServiceUrl") and assign the result to the proxy's Url property (BR-001).
  3. AppGlobal.EnvironmentService lazily instantiates WindowsEnvironmentService when HttpContext.Current Is Nothing, or WebEnvironmentService otherwise.
  4. GetConfigSetting refreshes stale cached configuration, checks a developer override first, and only then returns the value loaded from configuration.
  5. If legacyMailServiceUrl cannot be resolved, the lookup throws before any mail request is attempted.

Origin: Steps 2.1–2.3 are implemented in Retrieve a configuration setting (SAIF.Framework.Security.EnvironmentApi) and are executed on behalf of this operation. 3. Select the transmission format from the isHtml flag (BR-002). - When the caller omits isHtml, VB's default-parameter value supplies True. - If isHtml is True, call SendMail(inToAddress, inFromAddress, inSubject, String.Empty). - If isHtml is False, call SendMailAsText(inToAddress, inFromAddress, inSubject, String.Empty). 4. Dispose the SOAP proxy and clear the module-level reference so the next call starts from a clean instance. 5. Return True once the dispatch path completes (BR-003). - On failure: any exception from endpoint resolution or the SOAP call itself propagates to the caller unmodified, because this function contains no Try...Catch handling of its own.

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([SendMail subject-only call]) --> Proxy[Create clsSAIFMessage]
    Proxy --> Url[Resolve legacyMailServiceUrl]
    Url --> Html{isHtml?}
    Html -->|True| HtmlSend[Call SendMail with empty body]
    Html -->|False| TextSend[Call SendMailAsText with empty body]
    HtmlSend --> Dispose[Dispose proxy]
    TextSend --> Dispose
    Dispose --> End([Return True])

Failure and edge-case behavior

  • A missing or unresolvable legacyMailServiceUrl setting stops the operation before any SOAP request reaches the network.
  • The function never inspects a response payload or status code from the mail service; "success" simply means execution reached the final Return True statement without an exception.
  • Because the endpoint is reassigned on every call, the design-time URL baked into the generated proxy is always overwritten before dispatch, so it has no effect at runtime.

Sources

  • SAIF.Framework.Mail\MailServices.vb
  • SAIF.Framework.Mail\Web References\SAIFMail\Reference.vb
  • SAIF.Framework.Security\AppGlobal.vb
  • SAIF.Framework.Security.EnvironmentApi\Core\Services\IEnvironmentService.cs
  • SAIF.Framework.Security.EnvironmentApi\Services.Common\EnvironmentServiceBase.cs