Belgelere geç
PHP

$client->senders

Bu ad alanındaki her yöntem: imzası, parametreleri, döndürdüğü değer ve bir örnek.

Yöntemler

What is known about the organisation behind a sender, the line the reading pane shows under an unfamiliar one, and looking a sender up.

senders->get

Read what is known about a sender

Kapsamlarthreads:read
İmza
get(string $email, ?string $apiKey = null): array

Returns a sentence or two about the organisation behind the domain of an address, the line the reading pane shows under an unfamiliar sender. Only the domain is read, so any address on it gives the same answer, and what is known is kept for the whole workspace.

A domain nobody has looked up yet is a 404. senders->research looks it up.

Parametreler

emailstringZorunlu

An address of the sender, such as [email protected].

apiKeystring

Overrides the client's API key for this call only.

Döndürür

An array with object set to sender_profile, domain, about and updatedAt.

Örnek

use OpenEmail\Exception\NotFoundException; try {    $sender = $client->senders->get('[email protected]');} catch (NotFoundException) {    $sender = $client->senders->research('[email protected]');} echo $sender['domain'], ': ', $sender['about'], PHP_EOL;

Notlar

Şurada da var

API
GET /senders/{email}
TypeScript
senders.get()
Python
senders.get()
Ruby
senders.get
CLI
openemail senders get

senders->research

Look a sender up

Kapsamlarthreads:read
İmza
research(string $email, ?string $apiKey = null): array

Searches the web for the organisation behind the domain of an address and keeps what it found for the whole workspace, as the reading pane does the first time it shows a sender. A domain that was looked up before is answered from what was kept, and nothing is searched again.

Only the owner of the workspace may look senders up, with a key or an app that is not limited to particular addresses or domains: anything else is a 422 capability_unsupported or a 403 owner_only. A workspace looks up at most 200 senders a day, and the next one is a 429 research_limit_reached. A domain nothing could be found about is a 404.

Parametreler

emailstringZorunlu

An address of the sender. Only its domain is looked up.

apiKeystring

Overrides the client's API key for this call only.

Döndürür

The same array as senders->get, with what was found or what was already known.

Örnek

use OpenEmail\Exception\ApiException; try {    $sender = $client->senders->research('[email protected]');     echo $sender['about'], PHP_EOL;} catch (ApiException $error) {    if (!$error->isRateLimited() && !$error->isNotFound()) {        throw $error;    }     echo 'Nothing to show yet: ', $error->errorCode, PHP_EOL;}

Notlar

  • The SDK retries it after a network failure, which is safe because a domain that was found is answered from what was kept.

Şurada da var

API
POST /senders/{email}/research
TypeScript
senders.research()
Python
senders.research()
Ruby
senders.research
CLI
openemail senders research