IMAP

Types

EasyCurl.IMAPResponseType
IMAPResponse <: CurlResponse

An IMAP response object returned on a request completion.

Fields

NameDescriptionAccessors (get)
total_time::Float64Total time spent receiving a response in seconds.imap_total_time(x), curl_total_time(x)
body::Vector{UInt8}The response body as a vector of bytes.imap_body(x), curl_body(x)
source
EasyCurl.IMAPOptionsType
IMAPOptions <: CurlOptions

Represents options for configuring an IMAP request.

Fields

NameDescriptionDefault
read_timeout::RealTimeout in seconds for reading the response.30
connect_timeout::RealMaximum time in seconds that you allow the connection phase to take.10
ssl_verifyhost::BoolEnables SSL certificate's host verification.true
ssl_verifypeer::BoolEnables the SSL certificate verification.true
verbose::BoolEnables detailed output from Curl (useful for debugging).false
proxy::Union{String,Nothing}Proxy server URL, or nothing to bypass proxy settings.nothing
interface::Union{String,Nothing}Specifies a particular network interface to use for the request, or nothing to use the default.nothing
source

Methods

EasyCurl.imap_requestFunction
imap_request(url::String, username::String, password::String; kw...) -> IMAPResponse

Send a url IMAP request using username and password, then return a IMAPResponse object.

Keyword arguments

NameDescriptionDefault
mailbox::Union{Nothing,String}Required mailbox.nothing
commandAvailable IMAP commands after authentication.nothing
path::Union{Nothing,String}The specific path or criteria of the query.nothing
retry::Int64Number of retries.0
retry_delay::RealDelay after failed request.0.25
options...Another IMAP request options.

Examples

julia> response = imap_request(
           "imaps://imap.gmail.com:993",
           "your_imap_username",
           "your_imap_password",
           mailbox = "INBOX",
           command = "SEARCH SINCE 09-Sep-2024",
       );

julia> imap_body(response) |> String |> print
* SEARCH 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410
source