Skip to content

Send email via legacy SOAP mail service

This operation sends an outbound email, with or without an attachment, by delegating to a legacy SOAP web service whose endpoint URL is resolved at runtime from configuration.

Field Value
Operation ID OP-CMM-001
Trigger Explicit call from consuming application code
Inputs To/from/subject address strings; optional message body; optional attachment as stream, byte array, or file path
Outputs Boolean (declared but no explicit Return statement is present in the observed bodies, so these methods effectively always return the default False)*
Primary components Utilities.clsMailMessage.SendMail (2 overloads), SendMailWithAttachment (4 overloads)
Entry point SAIF.Presentation.Web.Core.Infragistics103\clsMailMessage.vb

Steps

  1. Instantiates New SAIFMail.clsSAIFMessage (a generated SOAP proxy)**.
  2. Sets its .Url (via CType(m_mailmsg, System.Web.Services.Protocols.SoapHttpClientProtocol).Url) from AppGlobal.EnvironmentService.GetConfigSetting("LegacyMailWebServiceUrl") — configuration-driven endpoint resolution.
  3. Calls SendMail(inToAddress, inFromAddress, inSubject, inMessage) for plain-text email, or SendWithAttach(inToAddress, inFromAddress, inSubject, inMessage, attachmentBytes, inAttachName) when an attachment is supplied.
  4. For attachment overloads: the attachment is passed as a byte array, obtained via GetFileAsBytes (file-path overload) or GetStreamAsBytes (stream overload).
  5. Disposes and nulls the proxy instance.
  6. On failure: no error handling around the SOAP call is present; a service fault propagates as an unhandled exception.

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([SendMail / SendMailWithAttachment called]) --> S1[New SAIFMail.clsSAIFMessage proxy]
    S1 --> S2[Resolve LegacyMailWebServiceUrl from config]
    S2 --> S3{Attachment provided?}
    S3 -->|Yes, stream| S4a[GetStreamAsBytes]
    S3 -->|Yes, file path| S4b[GetFileAsBytes]
    S3 -->|No| S4c[Skip attachment conversion]
    S4a --> S5[Call SendWithAttach on proxy]
    S4b --> S5
    S4c --> S6[Call SendMail on proxy]
    S5 --> S7[Dispose proxy]
    S6 --> S7
    S7 --> EndOk([Return default False])

Failure and edge-case behavior

  • No error handling around the SOAP call is present; a service fault would propagate as an unhandled exception.
  • All six overloads have no explicit Return statement in their observed bodies, so they effectively always return the default False*.

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • SAIF.Presentation.Web.Core.Infragistics103\clsMailMessage.vb