Skip to main content

Crate sendry

Crate sendry 

Source
Expand description

Official Rust client for the Sendry email API.

use sendry::{Sendry, SendEmail};

let client = Sendry::new(std::env::var("SENDRY_API_KEY")?);

let resp = client.emails().send(SendEmail {
    from:    "hello@yourdomain.com".into(),
    to:      vec!["user@example.com".into()],
    subject: "Welcome".into(),
    html:    Some("<p>Hi.</p>".into()),
    ..Default::default()
}).await?;

println!("sent: {}", resp.id);

Structs§

AbSplit
A/B split definition.
AddAutomationStep
Parameters for AutomationSteps::add.
AddSuppression
Parameters for Suppression::add.
AffectedComponent
One affected component.
Analytics
Analytics resource handle.
AnalyticsBucket
Per-bucket counts.
AnalyticsParams
Stats query parameters.
AnalyticsResponse
Response from Analytics::stats.
AnalyticsSummary
Summary totals + rates.
ApiKey
API key record (key value is masked).
ApiKeyCreated
Response from ApiKeys::create. Includes the full plaintext key — store it now.
ApiKeys
API keys resource handle.
AssignIp
Parameters for DedicatedIps::assign.
Audience
Audience record returned by the API.
AudienceParams
Parameters for creating an audience.
Audiences
Audiences resource handle.
AuthenticationStatus
Authentication setup.
Automation
Automation record.
AutomationRun
One automation run.
AutomationRunStep
One step execution within a run.
AutomationRunStepList
Run steps list response.
AutomationRuns
Automation runs sub-resource handle.
AutomationStep
One step record.
AutomationStepList
Steps list response.
AutomationSteps
Automation steps sub-resource handle.
Automations
Automations resource handle.
BatchEmail
Parameters for Emails::send_batch.
BatchEmailItem
One item in a batch send.
BatchResponse
Response from Emails::send_batch.
BatchUnsubscribe
Parameters for Unsubscribes::create_batch.
BatchUnsubscribeResponse
Response from Unsubscribes::create_batch.
BenchmarkBucket
Per-day benchmark bucket.
BenchmarkParams
Benchmark query parameters.
BenchmarkResponse
Benchmark response.
Billing
Billing resource handle.
BillingPlan
Plan info.
BillingUsage
Period usage.
BlocklistAlertItem
One blocklist alert.
BlocklistCheckBody
Body for Deliverability::run_blocklist_check.
BlocklistCheckItem
One blocklist check.
BlocklistQuery
Blocklist query parameters.
BlocklistResponse
Blocklist response.
BlocklistSummary
Summary counts.
BranchCondition
Branch condition.
BrandingSettings
Branding settings.
BreakdownItem
One breakdown row.
BreakdownParams
Breakdown query parameters.
BreakdownResponse
Breakdown response.
Campaign
Campaign record returned by the API.
CampaignParams
Parameters for creating a campaign.
Campaigns
Campaigns resource handle.
CancelEmailResponse
Response from Emails::cancel.
CheckoutSession
Stripe Checkout session.
CohortBucket
One cohort bucket.
CohortParams
Cohort query parameters.
CohortResponse
Cohort response.
ComparisonChanges
Period-over-period change percentages and deltas.
ComparisonPeriodStats
Comparison period stats.
ComparisonResponse
Comparison response.
Contact
Contact record returned by the API.
ContactParams
Parameters for upserting a contact.
Contacts
Contacts resource handle.
CreateApiKey
Parameters for creating an API key.
CreateAutomation
Parameters for Automations::create.
CreateAutomationRun
Parameters for AutomationRuns::create.
CreateCheckout
Parameters for Billing::create_checkout.
CreatePortal
Parameters for Billing::create_portal.
CreateUnsubscribe
Parameters for Unsubscribes::create.
DedicatedIp
Dedicated IP record.
DedicatedIpAssignment
One IP assignment record (embedded in DedicatedIp).
DedicatedIps
Dedicated IPs resource handle.
DeleteResponse
Simple deletion acknowledgement returned by many DELETE endpoints.
Deliverability
Deliverability resource handle.
DeliverabilityReport
Full deliverability report.
DeliverabilityReportQuery
Report query parameters.
Domain
Domain record returned by the API.
DomainParams
Parameters for creating a domain.
Domains
Domains resource handle.
Email
Single email as returned by get / list.
EmailResponse
Response from Emails::send.
Emails
Emails resource handle.
Events
Events resource handle.
ExportParams
Export parameters.
GetLatencyParams
Parameters for Status::get_latency.
Inbound
Inbound resource handle.
InboundConfig
Inbound forwarding configuration.
InboundEmail
Inbound email record.
InboundEmailAttachment
One inbound email attachment.
InboxPlacementEstimate
Inbox placement estimate.
Incident
One incident.
IncidentUpdate
One incident update.
IngestEvent
Parameters for Events::ingest.
IngestedEvent
Ingested event record.
InviteTeamMember
Parameters for Team::invite.
IpAssignment
Assignment record returned by DedicatedIps::assign.
LatencyHourBucket
One hour of latency data.
LatencyStats
Latency stats.
ListAutomationRuns
Filters for AutomationRuns::list.
ListAutomations
Filters for Automations::list.
ListEvents
Filters for Events::list.
ListTeamResponse
Response from Team::list.
ListUnsubscribes
Filters for Unsubscribes::list.
LogEvent
One log line.
LogsParams
Filters for Analytics::logs.
NotificationPreferences
Notification preferences record.
NotificationPreferencesResource
Notification preferences resource handle.
OrgRegionSettings
Org region settings.
Organization
Organisation record.
Organizations
Organizations resource handle.
Page
Common pagination wrapper returned by every list endpoint.
PaginationParams
Cursor pagination query parameters.
PortalSession
Stripe Billing Portal session.
ProvisionDedicatedIp
Parameters for DedicatedIps::provision.
Region
One region.
RegionAnalyticsItem
One row of region analytics.
RegionAnalyticsParams
Parameters for Regions::get_region_analytics.
RegionAnalyticsResponse
Region analytics response.
RegionList
Wrapper returned by Regions::list.
Regions
Regions resource handle.
RenderTemplate
Parameters for Templates::render.
RenderTemplateResponse
Response from Templates::render.
ReportBlocklistStatus
Blocklist status block.
ReportMetrics
Report aggregate metrics.
ReportPeriod
Report period.
ReportReputation
Report reputation summary.
ReputationCurrent
Current reputation.
ReputationDomain
Per-domain reputation.
ReputationFactors
Reputation factors.
ReputationHistoryQuery
Reputation history query parameters.
ReputationQuery
Reputation query parameters.
ReputationResponse
Reputation response.
ReputationSnapshot
One reputation snapshot.
SendEmail
Parameters for Emails::send.
SendMarketingEmail
Parameters for Emails::send_marketing.
Sendry
Async client for the Sendry API.
SendryBuilder
Builder for customising a Sendry client.
SlaSummary
SLA summary.
Status
Status resource handle.
StatusComponent
One status component.
Suppression
Suppression resource handle.
SuppressionEntry
One suppression row.
SystemStatus
System status snapshot.
Team
Team resource handle.
TeamMember
One member or pending invite.
TeamSeats
Seat usage.
Template
Template record returned by the API.
TemplateParams
Parameters for creating a template.
TemplateStarter
One starter template.
TemplateStarterList
Wrapper for Templates::list_starters.
Templates
Templates resource handle.
TestEmail
Full test email.
TestEmailSummary
Test email summary (for list responses).
TestEmails
Test emails resource handle.
UnsubscribeEntry
One unsubscribe record.
Unsubscribes
Unsubscribes resource handle.
UpdateAutomation
Parameters for Automations::update. All fields optional.
UpdateAutomationStep
Parameters for AutomationSteps::update.
UpdateBranding
Parameters for Organizations::update_branding. All fields optional.
UpdateDomainRegion
Parameters for Regions::set_domain_region.
UpdateInboundConfig
Parameters for Inbound::update_config.
UpdateNotificationPreferences
Parameters for NotificationPreferencesResource::update. All fields are optional.
UpdateOrgRegion
Parameters for Regions::update_org_settings.
UpdateOrganization
Parameters for Organizations::update.
UpdateTeamMemberRole
Parameters for Team::update_role.
UpdateTemplate
Parameters for Templates::update. All fields optional.
Webhook
Webhook record returned by the API.
WebhookParams
Parameters for creating a webhook.
Webhooks
Webhooks resource handle.

Enums§

AutomationStepConfig
One step config — discriminated by type field.
Error
All errors this crate can return.

Constants§

VERSION
SDK version, set by Cargo at compile time.

Functions§

verify_webhook_signature
Verify a Sendry webhook signature using HMAC-SHA256 with constant-time comparison.