문서로 건너뛰기
C#

client.Senders

이 네임스페이스의 모든 메서드: 시그니처, 매개변수, 반환값과 예시.

메서드

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.GetAsync

Read what is known about a sender

범위threads:read
시그니처
Task<JsonObject> GetAsync(    string email,    string? apiKey = null,    CancellationToken cancellationToken = default)

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, a subdomain such as mail.stripe.com included, and domain names the organisation's own domain. What is known is shared by every workspace and looked up again by itself once it is 30 days old.

A domain nobody has looked up yet is a 404, and so are personal mailbox providers such as Gmail and the domains of your own workspace. Senders.ResearchAsync looks a domain up.

매개변수

emailstring필수

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

apiKeystring?

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

cancellationTokenCancellationToken

Cancels the request.

반환값

A JsonObject with object set to sender_profile, domain, about and updatedAt.

예시

using System.Text.Json.Nodes; JsonObject sender; try{    sender = await client.Senders.GetAsync("[email protected]");}catch (OpenEmailApiException error) when (error.IsNotFound){    sender = await client.Senders.ResearchAsync("[email protected]");} Console.WriteLine($"{sender["domain"]}: {sender["about"]}");

참고

다른 사용처

API
GET /senders/{email}
TypeScript
senders.get()
Python
senders.get()
Ruby
senders.get
PHP
senders->get
Go
Senders.Get
Java
senders().get
CLI
openemail senders get

Senders.ResearchAsync

Look a sender up

범위threads:read
시그니처
Task<JsonObject> ResearchAsync(    string email,    string? apiKey = null,    CancellationToken cancellationToken = default)

Searches the web for the organisation behind the domain of an address and keeps what it found, as the reading pane does the first time it shows a sender. Every address under the domain shares the answer, a subdomain such as mail.stripe.com included, and it is kept for 30 days before it is looked up again, so a domain that was looked up before is answered from what was kept and nothing is searched. Personal mailbox providers such as Gmail and the domains of your own workspace are never looked up.

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 new domains a day, and the next one is a 429 research_limit_reached. A domain nothing could be found about, a personal mailbox provider and a domain of your own workspace are a 404.

매개변수

emailstring필수

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

apiKeystring?

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

cancellationTokenCancellationToken

Cancels the request.

반환값

The same object as Senders.GetAsync, with what was found or what was already known.

예시

try{    var sender = await client.Senders.ResearchAsync("[email protected]");     Console.WriteLine($"{sender["about"]}");}catch (OpenEmailApiException error){    if (!error.IsRateLimited && !error.IsNotFound)    {        throw;    }     Console.WriteLine($"Nothing to show yet: {error.Code}");}

참고

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

다른 사용처

API
POST /senders/{email}/research
TypeScript
senders.research()
Python
senders.research()
Ruby
senders.research
PHP
senders->research
Go
Senders.Research
Java
senders().research
CLI
openemail senders research