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¶
- Create a new
SAIFMail.clsSAIFMessageSOAP client for this call; no proxy instance is reused across invocations. - Look up the mail endpoint by calling
AppGlobal.EnvironmentService.GetConfigSetting("legacyMailServiceUrl")and assign the result to the proxy'sUrlproperty (BR-001). AppGlobal.EnvironmentServicelazily instantiatesWindowsEnvironmentServicewhenHttpContext.Current Is Nothing, orWebEnvironmentServiceotherwise.GetConfigSettingrefreshes stale cached configuration, checks a developer override first, and only then returns the value loaded from configuration.- If
legacyMailServiceUrlcannot 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 theisHtmlflag (BR-002). - When the caller omitsisHtml, VB's default-parameter value suppliesTrue. - IfisHtmlisTrue, callSendMail(inToAddress, inFromAddress, inSubject, String.Empty). - IfisHtmlisFalse, callSendMailAsText(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. ReturnTrueonce 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 noTry...Catchhandling 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
legacyMailServiceUrlsetting 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 Truestatement 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.
Related documentation¶
- Operations and processes
- Overview
- Architecture
- Dependencies
- Business rules
- Configuration
- API reference
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