Changelog
Every release of the package, newest first.
0.1.0
Upgrading from 0.0.1: four new arguments sit before arguments that were already there, so a call that passes those later arguments by position has to name them. calendarIds: comes before limit: in calendar->listEvents(), listAllEvents() and iterateEvents(), addressBook: before limit: in contacts->listCards(), listAllCards() and iterateCards(), chatId: before limit: in tasks->list(), listAll() and iterate(), and calendarId: before apiKey: in calendar->importIcs(), where an API key passed third by position is now sent as the calendar id.
- To-dos: a to-do list is a calendar of kind
todos(CalendarKinds::TODOS), and its items are RFC 5545 to-dos that calendar apps such as Reminders, Thunderbird and tasks.org sync over CalDAV.calendar->listTodos(),listAllTodos()anditerateTodos()read them throughGET /calendar/todos, filtered bycalendarIds:,state:(open,doneorall, asNextmail\Constants\TodoStatesnames them),dueBefore:anddueAfter:.getTodo(),createTodo(),updateTodo()anddeleteTodo()work on one, anddeleteTodo()says how many to-dos itremoved. A to-do is an array with atitle,notes, astatusthatNextmail\Constants\TodoStatusesnames,startanddueas a day or a moment withallDayandtimezone,completedAt,priority,percentComplete,categories, theparentIdof the to-do it is a step of and therecurrenceit repeats by.start,due,dueBefore:anddueAfter:take aDateTimeInterfaceor a string. Checking off a repeating to-do moves it to its next date. They needcalendar:readandcalendar:write. calendar->listCalendars()takeskind:and lists your to-do lists withkind: 'todos', andcalendar->createCalendar()takeskindto make one. Members, colours, order and deleting work on to-do lists as they do on calendars.calendar->deleteCalendar()takesnotifyGuests:: left out or true, the guests of every upcoming meeting you organised in the calendar are sent a cancellation, ascancelEvent()does, and false deletes it without telling anyone. The array it returns carriescancelledMeetings. Sending the cancellations needsemails:sendas well.- The two new arguments come after
apiKey:, so a call that passesapiKeyby position keeps working:listCalendars(?string $apiKey = null, ?string $kind = null)anddeleteCalendar(string $id, ?string $apiKey = null, ?bool $notifyGuests = null). They are the only methods whoseapiKey:is not their last argument, so passkind:andnotifyGuests:by name. calendar->listCalendarLogins(),createCalendarLogin(),revokeCalendarLogin()andcreateCalendarLoginProfileLink()manage calendar sign-ins, through/calendar/logins. A calendar sign-in belongs to a person, not to an address: its username iscal-and ten letters and digits, never an address, and it signs calendar and contacts apps in over CalDAV and CardDAV to that person’s calendars, the calendars and address books shared with them and their contacts, even when they hold no address at all. Mail apps refuse it and it never sends.createCalendarLogin()returns the sign-in with itspasswordshown once, itsservers(username,caldavandcarddav, eachnullwhen the person’s role does not reach it) and an Apple configuration profile with CalDAV and CardDAV only inappleProfile, andcreateCalendarLoginProfileLink()returns a one-time link that makes one on an Apple device. Your own takeaccount:readandaccount:write, andmember:onlistCalendarLogins(), ormemberin the body of either create, reaches a member’s withmembers:write. Neither create is retried automatically.SecurityEventKindsgainsCALENDAR_LOGIN_CREATED('calendar-login-created') andCALENDAR_LOGIN_REVOKED('calendar-login-revoked'), and thedetailof a security log entry gainslogin, the username of the sign-in the entry is about.threads->listAutomations()reads which automations ran on a thread and what they did, throughGET /threads/{id}/automations: a list of arrays, newest first, each with theautomationit was (id,nameandstatus), itsstatusandtrigger, the case the email matched inmatch(the address or domain that received it, the sender entry and the filters that held, ornull), themessagesof the thread it started from or sent, each with arolethatNextmail\Constants\AutomationThreadRolesnames, and every step it ran insteps, with the step as the version defines it. It needsthreads:readandautomations:read.liveEvents->stream()follows the mailbox as it changes, without polling: aGeneratoroverGET /live-eventsthat yields eachmessage.received,message.sent,thread.changed,thread.deletedandmessage.status_changedevent as it arrives, as an array withid,type,occurredAtanddata, for as long as you read it. It takestypes:,address:,lastEventId:andapiKey:. It opens the stream again by itself after the server ends it or the connection drops and resumes throughLast-Event-ID, backs off after a network failure, a 408, a 429 or a 5xx (honouringRetry-After), reopens a connection that stays silent for 60 seconds, yields an event whosetypeisresetwhen it cannot resume, and throws on any other error. Breaking out of the loop closes the connection.Nextmail\Constants\LiveEventTypes,LiveSendStatusesandLiveResetReasonsname the values.CurlHttpClientimplements the newNextmail\Http\StreamingHttpClient, whosestream()hands over a response as it arrives throughNextmail\Http\HttpStream, andBufferedHttpStreamserves a response already in hand, for test doubles.Psr18HttpClientcannot stream, so with itliveEvents->stream()throws anInvalidArgumentException.threads->waitForEmail()holds a request open for up totimeout:seconds, from 0 to 60 and 30 by default, until a message that matchesfrom:,subject:andaddress:arrives aftersince:, and returns it as themessageof amessage_wait, ornullwhen the wait ran out. The call getstimeout:plus 15 seconds whatever the client’s owntimeout:is, and it is retried like any read.AddressForwardStatusesgainsBOUNCED('bounced'): a forwarding destination whose server refused forwarded mail for good, so nothing is forwarded to it until it confirms again. A route that forwards to one readsforward_bounced(AddressRouteInactiveReasons::FORWARD_BOUNCED). Asking a bounced destination again sends it a new confirmation.- A traffic entry and a routed message carry
verdicts['arc']: the ARC verdict for the servers that forwarded the message on its way in,pass,fail,noneortemperror, andnullon an entry written before ARC was checked. calendar->listCalendars(),getCalendar(),createCalendar(),updateCalendar()anddeleteCalendar()manage your calendars: the ones you keep, with your default one among them, and the ones other members of the workspace gave you access to, each with its owncolorandposition. Deleting a calendar deletes its events, and your default calendar cannot be deleted.calendar->setCalendarMember()andremoveCalendarMember()give a memberreadorwriteaccess to a calendar you keep (CollectionAccessLevels), andaccesson a calendar says what you may do with it (CollectionRights). A calendar’skindis one ofCalendarKinds.- Calendar events and occurrences carry
calendarId.createEvent()takescalendarIdto put the event in a calendar,updateEvent()takes it to move one,listEvents(),listAllEvents()anditerateEvents()takecalendarIds:to keep only some calendars,createFeed()takescalendarIdto publish one calendar (and a calendar link says which), andimportIcs()takescalendarId:for the calendar the events go into. contacts->listAddressBooks()lists your address book and the ones other members gave you access to.contacts->setAddressBookMember()andremoveAddressBookMember()give a memberreadorwriteaccess to yours.listCards(),listAllCards()anditerateCards()takeaddressBook:to read one you are a member of, andcreateCard()takesaddressBookto add to one you may write.setCalendarMember()andsetAddressBookMember()are retried like a read, because setting the same access again changes nothing, and the tworemovemethods are not.- The new arguments follow the order of the TypeScript SDK:
calendarIds:comes beforelimit:inlistEvents(),listAllEvents()anditerateEvents(),addressBook:beforelimit:inlistCards(),listAllCards()anditerateCards(), andcalendarId:beforeapiKey:inimportIcs(). A call that passes the later arguments by position has to name them. traffic->list(),listAll()anditerate()read the traffic log: one entry for each message and recipient at each step it took in or out of the workspace, newest first, kept for 30 days. They takedomainId:,direction:,outcomes:,address:,recipient:,since:anduntil:. Outbound entries needemails:readand inbound onesthreads:read.emails->sendRaw()sends an RFC 5322 message you built yourself, as written:rawis its bytes, base64 text, anSplFileInfoor a stream, up to 10 MB. The sender is its From header and the recipients its To, Cc and Bcc headers, unlessto,ccorbccgive the envelope. It takes the scheduling, tracking, signature, tag and lane options ofsend(), honoursidempotencyKey:, and never sends a Bcc header.- The
email_receivedtrigger of an automation takessenders, the addresses or domains its mail has to come from, where a domain covers its subdomains. Left out or empty, mail from anybody starts it. settings->updatetakeslabelAlerts, andsettings->getreturns it: label ids under each workspace id whose mail still alerts you while labelled mail stays out of your inbox.MailboxProviders::OPENEMAILandMailServices::OPENEMAIL('openemail'): the provider of a mailbox on OpenEmail and thesentWithof a message sent with it.sentWithstays empty, rather than naming Outlook or Gmail, when another mail service signed the message and the only hint is that it passed through Microsoft’s or Google’s servers on the way or was written in the Outlook app.shareLinks->list,listAllanditerateread the templates, forms and automations the workspace shares at a public link, the newest first, with how often each page was opened and each item copied, and takekind:(ShareKinds),limit:andcursor:.shareLinks->getreads the link of one item from its kind and id,shareLinks->setmakes the item public, or with['copyable' => false]lets people only look at it, and is retried like a read because an item keeps one link, andshareLinks->deletemakes it private again. A private item answers 404share_link_not_found.shared->getreads what the public page of a link shows, from the token at the end of the link and from any workspace, andshared->copycopies the item into this workspace as a draft. A copy is never retried, because a second call makes a second copy. An item its owner shares to look at only answers 403share_not_copyable, and a link that no longer works answers 404shared_item_not_found.tasks->list(),listAll()anditerate()takechatId:to read only the tasks made in one assistant chat, the ones the chat shows above its messages, as the Tasks page does when a chat’s task is opened. A chat belongs to one person, so the id of a chat you cannot open lists no tasks.chatId:comes beforelimit:, in the order of the TypeScript SDK, so a call that passes the later arguments by position has to name them.
0.0.1
The first release of the PHP package. It has a method for every one of the 746 methods of the TypeScript SDK, in 53 namespaces, each under its TypeScript name, and a parity check in the package’s own build proves that every one sends the same request as its TypeScript twin, retries the same way and returns the same shape.
Nextmail\Nextmailhas a property for every namespace, fromemails,threadsandtemplatestoautomations,bookingsandconnectedMailboxes. A request body is an associative array whose keys keep the API’s camelCase names, the options of a call are named arguments such asidempotencyKey:andlimit:, and a response comes back as the decoded associative array.new Nextmail()andNextmail::createClient()takeapiKey:oraccessToken:, andaccessToken:also takes a callable that returns a token, called before every request. Anything you leave out is read fromNEXTMAIL_API_KEY,NEXTMAIL_ACCESS_TOKENandNEXTMAIL_BASE_URL, andbaseUrl:,timeout:,maxRetries:,headers:,userAgent:andhttpClient:set the rest. Every method takesapiKey:, orinboxToken:ontempMail, to act with another credential for one call.- Every workspace is the same kind, the one that holds the free address included. That address sends only the mail a person writes in the app, so a send from it with an API key or an access token is refused with
from_address_forbidden. Nextmail::init(),Nextmail::getClient()andNextmail::resetClient()manage one shared client, andNextmail::createTempMail()opens disposable inboxes with no credential.- Every paginated resource has
list, which returns oneNextmail\Result\Pagewithitems,hasMoreandnextCursor,listAll, which returns every item as an array, anditerate, which returns a Generator that fetches the next page only when it gets there. - An API refusal throws
Nextmail\Exception\ApiExceptionor its subclass for the error type, such asNotFoundException,ValidationExceptionorRateLimitException, withstatus,type,errorCode,param,docUrl,requestId,retryAfterSecondsandfields, and methods such asisValidation(),isStepUpRequired()andisRetryable(). No response at all throwsNetworkException, withisTimeout()when the deadline passed, and a mistake in the call itself throwsInvalidArgumentExceptionbefore anything is sent. Every exception the package throws implementsNextmail\Exception\NextmailException. - Reads, sends and every write that is safe to repeat are retried on 408, 500, 502, 503 and 504 with backoff, and on a 429 only when its
Retry-Afteris a minute or less. A send carries an idempotency key that its retries reuse, so a retry never sends a second message.timeout:bounds a whole attempt, and uploads wait at least ten minutes. Nextmail::verifyWebhookSignature()checks a delivery in constant time, refuses one more than five minutes old and returns the decoded event. It reads the signature from an array of headers in any case, from$_SERVER, from a Symfony or Laravel header bag, or from a PSR-7 message.- The helpers of the TypeScript SDK are here too, such as
Nextmail::toBase64()andNextmail::resolveLanguage(), and every value set it exports is a class inNextmail\Constants, such asWebhookEventsandApiScopes, with avalues()method for the whole set. - Requests go through one cURL handle per client, which keeps its connection open between requests and opens a new one after
pcntl_fork.Nextmail\Http\Psr18HttpClientsends them through Guzzle, Symfony HttpClient or any other PSR-18 client instead, and anything that implementsNextmail\Http\HttpClientcan take the place of either, which is how a test runs without a network. - Credentials stay out of sight: every parameter that carries one is marked
#[\SensitiveParameter], no dump of a client or a request shows one, and the client never sends one over plainhttp:to anything but this machine. - When a newer version is on Packagist, the client says so once, on the command line and only on a terminal.
disableUpdateNotice: trueorNEXTMAIL_DISABLE_UPDATE_NOTICE=1turns that off. - It needs PHP 8.2 or later with the curl and json extensions, and nothing else.
- API keys begin
nm_live_ornm_test_, and temporary inbox tokensnm_inbox_. The client refuses a key of any other shape. - The six image uploads,
account->setPhoto,contacts->setPhoto,domains->setAddressPhoto,bookings->uploadBackground,branding->uploadImageandtemplates->uploadImage, take images up to 100 MB and acrop:argument, an array ofx,y,widthandheightas fractions of the image from 0 to 1, and wait at least ten minutes, asfiles->uploaddoes. emails->listEventsByMessageId,listAllEventsByMessageIdanditerateEventsByMessageIdread the event trail of a sent email found by the Message-ID header it went out with, for a caller that holds that header and not themsg_id, such as a reply or a bounce report that quotes it. The Message-ID is the first argument, with or without its angle brackets. They takeaddress:,limit:andcursor:, and a Message-ID that no message the key reaches went out with is a 404.providerImports->list,listAllanditeratetakesource:(ProviderImportProviders),status:(ImportHistoryStatuses) andsearch:, up to 320 characters, the filtersimports->listtakes. An import from a provider never pauses, sostatus: 'paused'answers an empty page.emails->listEvents,listAllEventsanditerateEventstakemessageId:, 1 to 998 characters: the trail answers only when the send went out with that Message-ID header, with or without its angle brackets, and is a 404 otherwise. The send id is still required.files->createLinktakesreuse:.truehands back the working public link the file already has, with its own domain and download count, instead of making another, and a file with none gets a new one. A link handed back answers 200 and a new one 201.keys->create,updateanddelete,keys->rotatefor any key but the caller, andworkspaces->offerOwnership,withdrawOwnershipOffer,account->acceptOwnershipOfferanddeclineOwnershipOfferrefuse an API key with 403console_only. The console confirms these changes with a verification code, which a key cannot give, so they are made there. A key still rotates its own secret withkeys->rotateorme->rotate, and revokes keys withkeys->revoke.appHost->get,setandverifyreturnsender: where the emails sent to the people of the workspace come from, an array withaddress,domainandwaitingOn.waitingOnislogoorsigning(AppHostSenderWaits) until they come fromnoreply@the domain of the live web app address, then null.senderis null on the free plan and until an address on a verified domain of the workspace is live.- Each address from
addresses->list,listAllanditeratecarriesrole(AddressRoles):owneron every address for an API key, andmemberorviewerfor an app a member connected. A key narrowed to particular addresses or domains lists only the addresses and domains it covers, and the free address of the person the key acts for is listed, withroleowner, by a key of the workspace it belongs to. chats->listMessages,listAllMessagesanditerateMessagesread the messages of a chat, from the first unlessorder:isdesc(ChatMessageOrders). Each message has itstextand itsparts(ChatMessagePartTypes): the words, the tools the assistant called with their arguments, results and status (ChatToolCallStatuses), and the files. A tool result the caller may not read comes back redacted.chats->sendMessagesays something in a chat, or starts one under a new id, and returns the turn once the assistant has answered.status(ChatTurnStatuses) isawaiting_approvalwhen a call that changes something waits inpendingToolCalls, whichchats->approveToolCall, with optionalargs, orchats->denyToolCallanswers.'regenerate' => trueanswers the last message again, and inlineattachmentsare encoded as they are foremails->send.chats->stopTurnstops the assistant (ChatStopStatuses), and a stopped turn says why instopReason(ChatStopReasons). A turn runs for at most 240 seconds, sosendMessage,approveToolCallanddenyToolCallwait up to 5 minutes by default, or the client’stimeoutwhen that is longer, and taketimeout:for one call, where 0 waits as long as it takes. None of them is retried. The refusals arechat_busy,approval_pending,tool_not_offered,ai_quota_exceeded,ai_not_configuredandassistant_unavailable.members->getDirectorySyncreads directory sync (SCIM), andmembers->connectDirectorySyncturns it on and returns the token once.members->disconnectDirectorySyncturns it off,members->listDirectoryPeoplereads who the directory synced (DirectoryPersonStates), andmembers->setDirectoryDefaultRoleandsetDirectoryGroupRolechoose the roles it gives, or null for none. Only the owner or a role holdingworkspace:managereaches them, every change asks an OAuth access token for a verification code, and the refusals areplan_required,role_not_foundanddirectory_sync_not_connected.security->getPolicyreads whether the workspace requires two-factor sign-in and whether the person behind the client meets it, with no scope.security->updatePolicysetsrequireTwoFactor, withmembers:writeand a verification code.workspaces->getOwnershipOffer,offerOwnershipandwithdrawOwnershipOfferlet the owner offer the workspace to one of its members, andaccount->listOwnershipOffers,acceptOwnershipOfferanddeclineOwnershipOfferanswer the offers made to the person. Offering and accepting ask for a verification code. The refusals areownership_offer_not_found,ownership_not_eligible,ownership_changed,domain_moving,two_factor_requiredandworkspace_allowance_reached.account->setNamechanges the name of the person.account->listPushDevices,removePushDeviceandsendTestPushread the phones that get the person’s notifications (PushPlatforms), stop one, and send a test.account->endConnectedAppElevationmakes a connected app ask for verification codes again.dnsConnections->startreturns the link that connects a Cloudflare account to the workspace in a browser. It asks an OAuth access token for a verification code, and a server that cannot connect a provider answersdns_unavailable.domains->createMailAppProfileLinkmakes a one-time link that sets an address up on an Apple device. It needsmembers:writeand a verification code, and past 10 links an hour it isprofile_link_rate_limited.domains->startGravatarPublishreturns the link that publishes the photo of an address to Gravatar, refused withphoto_requiredandgravatar_not_configured.threads->setReplyingandclearReplyingshow the team who is writing a reply.threads->listTrackingreads the tracking report of every tracked message sent in a thread, andthreads->getDeliverycounts what bounced, was refused or was held back, both narrowed byaddress:.threads->listFileLinks,listAllFileLinksanditerateFileLinksread the download links one message carried, withincludeRevoked:.threads->countstakeshideLabelled:.senders->getAvatarfetches the picture of a sender as a string of bytes, andsenders->getreportsavatarUrlandavatarKind(SenderAvatarKinds).emails->sendandsendBatchtakeisForward,originalMessage, the quoted history of a forward or a reply, andencryption, an array withformatset topgp-mime,sealedAtandsealedTo, for a message you sealed yourself with OpenPGP.emails->translatetakesskipQuotedand reportsquotedHistoryKept.emails->listEvents,listAllEvents,iterateEventsandgetTrackingand thetrackingopens and clicks methods takeaddress:. Thetracking->listmethods takeoffsetMinutes:, andtracking->getStatsreportsdownloads, the files that went out as download links and how often they were fetched.templates->update,replaceContentandpublishtakeexpectedUpdatedAt, theupdatedAtof the version you read, and refuse a change saved in between withversion_conflict. Every template version reportsupdatedAt.drafts->createandupdatetakeattachments, up to 20 files inline or byfileId, encoded as they are foremails->send, and the attachmentsdrafts->getreturns reportfileId.- Filters:
ruleIds:on therules->listRunsmethods,audienceId:on thecontacts->listmethods,from:andto:oncontacts->activity,inactiveDays:on theaudiences->listContactsmethods,since:anduntil:onaudiences->growth,forms->analyticsandbookings->analytics,since:onbroadcasts->analyticsandbroadcasts->stats,source:,status:(ImportHistoryStatuses) andsearch:on theimports->listmethods, andfrom:on thesignatures->listmethods. contacts->setAudiencesandaudiences->addContacttakecreateContact, which saves an address that is not a contact yet as one first and then needscontacts:write. Through an app a member connected, an address another member saved is a 409contact_existsthere and oncontacts->save.- Scopes:
addresses->list,listAllanditerateneedemails:read, oremails:sendin its place. Theaudiences->listContactsmethods needcontacts:readas well asaudiences:read.emails->compose,rewrite,suggestSubjectandtranslatetakedrafts:writein place ofemails:send.domains->getMailAppSettingsandlistAppPasswordsneedthreads:read, anddomains->updateMailAppSettingsneedsthreads:readanddomains:write.domains->createAddressasks an OAuth access token for a verification code when it chooses where the mail goes or deletion on expiry. - An attachment given as an array with
urland optionallyfilenameandcontentType, a file at an https address, is sent as it is. domains->createAddressanddomains->updateAddresstakeexpiresAtandonExpiry(AddressExpiryActions), and every address reports them withexpiredAt. From itsexpiresAtan address takes no mail and sends none, a send from it is refused with 403address_expired, and within a minute it is switched off, or deleted with the conversations delivered to it whenonExpiryisdelete.WebhookEvents::ADDRESS_EXPIREDis the eventaddress.expired.DomainAddressDestinationsincludesWEBHOOKandGROUP. The same two methods takewebhookIdfor a webhook destination,tapWebhookIdsto copy every message to up to 5 endpoints, andgroupPosting(AddressGroupPostingPolicies) andgroupKeepCopyfor a group, and every address reports them. The refusals arewebhook_not_foundandtoo_many_taps.WebhookEvents::EMAIL_ROUTEDis the eventemail.routed: a message that arrived at an address whose destination iswebhook, or that a route of its domain sent to a webhook, was kept for 30 days instead of being filed. It goes only to the endpoint the address or route names and to the taps of the address, and always carriescontentandraw.routedBysays which sent it, one ofWebhookRoutedSources. Anemail.receivedevent carriestap, true when the endpoint gets the message as a tap of the address rather than through its subscription.domains->testRouteanswers which step decides mail to an address, without sending anything: an address that exists, the primary of an alias, a pattern route, the catch-all or none (AddressRouteTestSteps), with the route that decided and where the mail would end up.domains->listRoutes,listAllRoutesanditerateRoutesread the pattern routes of a domain in the order they are tried, anddomains->createRoute,getRoute,updateRouteanddeleteRoutemanage them. A route catches mail to addresses nobody created whose local part matches itspattern, such assupport-*, and delivers it to an address, forwards it once the destination confirms, posts it to a webhook asemail.routedor reads it on another domain (AddressRouteActions).activeandinactiveReason(AddressRouteInactiveReasons) say whether a route takes mail now. A domain holds at most 100 routes.domains->listGroupMembers,listAllGroupMembersanditerateGroupMembersread the group members of a group address, anddomains->addGroupMembersandremoveGroupMemberchange them. A group member is an address of the workspace or an address at another provider, which confirms by email first (GroupMemberKinds). A group holds at most 1,000 group members and groups nest at most 3 deep.domains->updatetakesaliasOf, which makes the domain an alias of another domain of the workspace, and every domain reportsaliasOfandaliases. The refusals arealias_not_allowed,alias_chainandalias_has_addresses.domains->updateAddressLimitstakesreceiving.storageBytes, a storage quota for one address from 1 MiB to 1 TiB. A message that would take the address past it gets a permanent bounce (5.2.2), and deleting mail for good makes room again.domains->getAddressLimitsreports what the address keeps inusage.storage, withbytesandmessages.webhooks->listDeadLetters,listAllDeadLettersanditerateDeadLettersread the events an endpoint gave up on: each event whose last automatic attempt failed, with how many times it was tried, the last answer and that attempt.status:reads theopenones by default, orreplayed,discardedorall(WebhookDeadLetterFilters). A dead letter is kept 30 days.webhooks->replayDeadLetterssends up to 100 open dead letters again in one call, the named ones or the oldest, and answers with anoutcomefor each (WebhookDeadLetterReplayOutcomes).webhooks->discardDeadLettercloses one without sending it, and one already replayed is 409dead_letter_resolved.webhooks->createandwebhooks->updatetakeretryPolicy(WebhookRetryPolicies):standardtries a failed delivery up to 8 times over about 27 and a half hours, andextendedup to 16 times over about 3 days. They also take'includeRaw' => true, which gives everyemail.receivedevent a link to the message source asdata.rawand needsthreads:read.threads->getRawMessagedownloads the source of one message as a string ofmessage/rfc822bytes, ready to save as an.emlfile: the message byte for byte as it arrived when the address hadkeepOriginalon, and otherwise a source rebuilt from the stored message. TheX-Message-Sourceresponse header says which, one ofRawMessageSources.domains->createAddressanddomains->updateAddresstake'keepOriginal' => true, which keeps each message the address receives byte for byte as it arrived, and every address reportskeepOriginal.domains->getAddressLimitsanddomains->updateAddressLimitsread and change what one address may send and receive: a hold that pauses or disables sending or receiving, caps per hour, per 24 hours and per month on messages and recipients, recipients per message, and lists of allowed and blocked recipients and allowed senders, with the usage so far.AddressHoldslists the holds.domains->getanddomains->updategive each DNS recordfound, what public DNS answers at that name now, andproblem, an array with acodefromDomainRecordProblemsand amessageto show a person.domains->updatetakes'autodiscovery' => true, which offers the SRV and TXT records that let mail, calendar and contacts apps find the servers from an address on the domain alone, listed inautodiscoveryRecords.webhooks->createandwebhooks->updatetake'includeContent' => true, which puts the message into everyemail.receivedevent asdata.content: the text, the HTML up to 512 KiB and each attachment with a link that downloads it for an hour. Turning it on needsthreads:read.- A connected mailbox can be the sender of
emails->sendwith an API key, of broadcasts, automations and sign-up forms, and a key or an app can send from the free address of the person it acts for. Only that person may send as a free address. threads->counts()leaves labelled mail out ofteam.assignedandteam.unassigned, as the inbox does, unless the person has chosen to show labelled mail in the inbox.billing->get()reportsusage.addressChecks, the deep address checks used this calendar month against what the plan includes, andbilling->listPlans()each plan’smonthlyAddressChecks.tools->checkAddress()andtools->checkAddresses()withdeepfirst use the deep checks the plan includes each month (10 on Free, 100 on Starter, 500 on Business, 1,000 on Enterprise), then pay as you go at $1.50 per 100 addresses.- An automation branch can check the contact’s address:
['kind' => 'address_check', 'mailbox' => ..., 'accept' => ...], withacceptfromNextmail\Constants\AutomationAddressAccepts. - A send leaves out an address whose domain takes no mail, and one the check on sending finds has no mailbox. Each shows as
suppressed, with anemail.suppressedwebhook that names the reason, never as a bounce. - Forms check the address of every sign-up:
forms->subscriberefuses one whose domain takes no mail with the field errorundeliverable.'refuseDisposable' => trueinsettingsalso refuses throwaway addresses (disposable),'checkMailbox' => trueruns a deep check on every sign-up and refuses a missing mailbox (mailbox_not_found), and a refused address that looks like a typo carriessuggestion. domains,members,keys,webhooksandrulestakeq:onlist,listAllanditerate, andconnectedMailboxes->listtakes it too. It narrows the list to what matches the search, ignoring case and accents and allowing for a typo when nothing matches exactly.rules->stats()reads how the rules did inside a window: the messages they matched, the ones with a failed action, a series of buckets, the matches of each rule, the actions they took, the failures and the senders they matched most. It takesruleIds:,since:,until:,grain:andoffsetMinutes:, likewebhooks->stats().