claude/smbcloud-github-app-k9641p
claude/smbcloud-github-app-k9641p
development
feature/apps
feature/build-release
feature/ci-docs
feature/ci-ruby-gems
feature/cicd
feature/completion
feature/dist-nuget
feature/fix-ci-sdk-pypi-rubygem
feature/fix-clippy-on-stable-channel
feature/fix-deployment-script
feature/github-email
feature/gresiq-v1
feature/project-new-structure
feature/rsync-deploy
feature/ruby-runner
feature/sdk-npm
feature/sdk-workflows
feature/smbcloud-cli-release-npm
feature/smbcloud-deploy
feature/wasm
main
release/v0.7.4
| 1 | use smbcloud_network::environment::Environment; |
| 2 | |
| 3 | /// API credential for the smbCloud transactional email API. |
| 4 | /// |
| 5 | /// `api_key` is a `smb_mail_…` key minted for a Mail app in the smbCloud |
| 6 | /// console. It is sent as `Authorization: Bearer <api_key>` and scopes sending |
| 7 | /// to that app's verified domain. |
| 8 | #[derive(Clone, Copy)] |
| 9 | pub struct EmailCredentials<'a> { |
| 10 | pub api_key: &'a str, |
| 11 | } |
| 12 | |
| 13 | /// Resolve the email API base URL for the given environment. |
| 14 | /// |
| 15 | /// - **Dev** → `http://localhost:8088` |
| 16 | /// - **Production** → `https://api.smbcloud.xyz` |
| 17 | pub fn base_url(environment: &Environment) -> String { |
| 18 | format!( |
| 19 | "{}://{}", |
| 20 | environment.api_protocol(), |
| 21 | environment.api_host() |
| 22 | ) |
| 23 | } |