---
title: SAIF.Framework.Mail dependencies
summary: Internal and external dependencies for this library.
status: draft
owner: <owner>
last_reviewed: 2026-07-23
library: SAIF.Framework.Mail
reference_type: package
---

# SAIF.Framework.Mail dependencies

`SAIF.Framework.Mail` has two internal project dependencies and one legacy ASMX web reference; it uses only classic assembly `<Reference>` and `<ProjectReference>` elements, with no NuGet `<PackageReference>` entries.

## Internal dependencies

| Dependency | Type | Usage |
| --- | --- | --- |
| [SAIF.Framework.Security](../saif-framework-security/overview.md) | Internal | Project reference and `Imports SAIF.Framework.Security`; provides `AppGlobal.EnvironmentService`, used to resolve the `legacyMailServiceUrl` config setting before every SOAP call (`MailServices.vb:22,80,109,145,167,189,210`). See [Configuration](configuration.md) for the verified endpoint settings catalog. |
| [SAIF.Framework.Security.EnvironmentApi](../saif-framework-security-environmentapi/overview.md) | Internal | Project reference (`SAIF.BOF.Framework.Mail.vbproj:87-90`). Not directly referenced by type name in `MailServices.vb`; likely a transitive dependency of `SAIF.Framework.Security`'s `AppGlobal.EnvironmentService`.* |

## External dependencies

| Dependency | Version | Usage |
| --- | --- | --- |
| `Web References\SAIFMail` (ASMX web reference — `clsSAIFMessage`, `http://saifonline/sendmail/clsSAIFMessage.asmx`) | N/A (generated proxy, not versioned as a package) | Generated SOAP client (`SAIFMail.clsSAIFMessage`, inherits `System.Web.Services.Protocols.SoapHttpClientProtocol`) invoked by every public `Send*` function in `Public Module Mail` to send mail via the legacy ASP.NET Web Services (ASMX) endpoint — `MailServices.vb:21`, `Web References\SAIFMail\Reference.vb:26-29,47`. |
| `System.Web.Services` | BCL (.NET Framework) | Base class (`SoapHttpClientProtocol`) for the generated SOAP proxy — `Web References\SAIFMail\Reference.vb:29`. |
| `System.Xml`, `System.Xml.Linq` | BCL (.NET Framework) | XML support for SOAP serialization — `SAIF.BOF.Framework.Mail.vbproj:62,65`. |
| `System.Core` | BCL (.NET Framework) | LINQ/core extensions — `SAIF.BOF.Framework.Mail.vbproj:64`. |
| `Microsoft.VisualBasic` | BCL (.NET Framework) | VB runtime (`Imports`) — `SAIF.BOF.Framework.Mail.vbproj:68`. |
| `System.IO` (`Stream`, `FileStream`) | BCL (.NET Framework) | File/stream attachment handling — `MailServices.vb:141,163,227,255`. |
| `System.Data` | BCL (.NET Framework) | Referenced but no direct usage observed in live code — `SAIF.BOF.Framework.Mail.vbproj:57`.** |
| `System.EnterpriseServices` | BCL (.NET Framework) | Referenced but no direct usage observed in live code — `SAIF.BOF.Framework.Mail.vbproj:58`.** |
| `System.ServiceModel` | BCL (.NET Framework, RequiredTargetFramework 3.0) | Referenced; no direct WCF usage observed in `MailServices.vb` — `SAIF.BOF.Framework.Mail.vbproj:59-61`.** |

No NuGet `<PackageReference>` elements are present in the `.vbproj`; this project uses only assembly `<Reference>` and `<ProjectReference>` elements (classic .NET Framework style) — `SAIF.BOF.Framework.Mail.vbproj`.

## Dependency risks and notes
- **Silent failure risk**: every `Send*` function always returns `True` regardless of the actual outcome of the underlying SOAP call — there is no exception handling or success/failure branching around the SOAP invocation itself. Callers cannot distinguish a successful send from a silent failure via the return value alone; failures would only surface as unhandled exceptions from the SOAP call itself.* This "always returns `True`" semantics should be treated as a functional risk for any caller relying on the return value to confirm delivery.
- **Legacy ASMX coupling**: the mail-sending capability depends entirely on a generated ASMX/SOAP proxy (`SAIFMail.clsSAIFMessage`) targeting a hardcoded design-time URL (`http://saifonline/sendmail/clsSAIFMessage.asmx`) that is overridden at runtime from configuration. If the environment configuration lookup (`legacyMailServiceUrl`) fails or is misconfigured, calls fall back to the design-time default baked into `app.config`/`My.Settings`.
- **Cross-layer coupling**: this library depends on `SAIF.Framework.Security` (and transitively `SAIF.Framework.Security.EnvironmentApi`) solely to resolve one configuration key (`legacyMailServiceUrl`), coupling a mail-sending utility to the security/environment framework layer.*
- **Generated code maintenance risk**: the SOAP proxy is checked-in generated code (not hand-authored) and cannot be regenerated without the original WSDL/tooling context; unreferenced-but-declared BCL references (`System.Data`, `System.EnterpriseServices`, `System.ServiceModel`) suggest possible legacy carry-over from a prior implementation.**
- **Exception rethrow pattern**: `GetFileAsBytes` uses `Throw ex` (not a bare `Throw`) in its `Catch` block, which resets the exception's stack trace, though the file handle is still safely closed via `Finally`.*

## Related documentation
- [Index](index.md)
- [Overview](overview.md)
- [Architecture](architecture.md)
- [Operations and processes](operations-processes.md)
- [Business rules](business-rules.md)
- [Configuration](configuration.md)
- [API reference](api/index.md)

> **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.Framework.Mail\MailServices.vb
- SAIF.Framework.Mail\SAIF.BOF.Framework.Mail.vbproj
- SAIF.Framework.Mail\app.config
- SAIF.Framework.Mail\Web References\SAIFMail\Reference.vb
- SAIF.Framework.Mail\My Project\Settings.Designer.vb
