{"id":23564207,"url":"https://github.com/selectel/pat","last_synced_at":"2025-04-30T16:17:54.348Z","repository":{"id":6905129,"uuid":"8155300","full_name":"selectel/pat","owner":"selectel","description":"Pat, the only SMTP postman!","archived":false,"fork":false,"pushed_at":"2022-11-23T22:36:35.000Z","size":24,"stargazers_count":23,"open_issues_count":1,"forks_count":14,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-04-30T16:17:46.573Z","etag":null,"topics":["community","erlang","smtp"],"latest_commit_sha":null,"homepage":"","language":"Erlang","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/selectel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-12T08:31:32.000Z","updated_at":"2024-10-06T15:44:07.000Z","dependencies_parsed_at":"2023-01-11T17:04:58.546Z","dependency_job_id":null,"html_url":"https://github.com/selectel/pat","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selectel%2Fpat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selectel%2Fpat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selectel%2Fpat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selectel%2Fpat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/selectel","download_url":"https://codeload.github.com/selectel/pat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251739677,"owners_count":21635893,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["community","erlang","smtp"],"created_at":"2024-12-26T17:13:20.822Z","updated_at":"2025-04-30T16:17:54.317Z","avatar_url":"https://github.com/selectel.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://github.com/selectel/pat/workflows/build/badge.svg)](https://github.com/selectel/pat)\n\n    _\n    |_) _ _|_\n    |  (_| |_\n\n        -- the only SMTP postman!\n\n`pat` is an easy to use SMTP client for Erlang. You only need to remember\n**two** functions:\n* `pat:connect/2` takes an SMTP relay as a `{Host, Port}` pair and\n  a list of supported options (see below) and opens an SMTP connection.\n* `pat:send/2` sends a given email via an SMTP connection.\n\nExample\n-------\n\n```erlang\n(pat@postoffice)1\u003e Opts = [{user, \u003c\u003c\"pat\"\u003e\u003e}, {password, \u003c\u003c\"postman\"\u003e\u003e}],\n(pat@postoffice)2\u003e Conn = pat:connect({\u003c\u003c\"smtp.yandex.ru\"\u003e\u003e, 25}, Opts),\n(pat@postoffice)3\u003e rr(\"include/*\").\n(pat@postoffice)4\u003e Email = #email{sender= \u003c\u003c\"pat@ya.ru\"\u003e\u003e,\n(pat@postoffice)4\u003e                recipients=[\u003c\u003c\"universe@gmail.com\"\u003e\u003e],\n(pat@postoffice)4\u003e                message= \u003c\u003c\"Hello world!\"\u003e\u003e}.\n(pat@postoffice)5\u003e pat:send(Conn, Email).\n{ok,\u003c\u003c\"2.0.0 Ok: queued on smtp13.mail.yandex.net as mM6eOXwj-mM642Fvi\"\u003e\u003e}\n```\n\nOptions\n-------\n\n#### `ssl`\n\n**Type**: `boolean()`\n\n**Description**: Connect to the SMTP server using a secure socket.\n\n#### `tls`\n\n**Type**: `never | maybe | always`\n\n**Description**: Connect to the SMTP server via an unsecure socket and\n    start TLS session afterward. `maybe` means TLS session will be sarted\n    only if the relay supports `STARTTLS`.\n\n#### `auth`\n\n**Type**: `never | maybe | always`\n\n**Description**: Authenticate with the SMTP server after connecting.\n    When `maybe`, authentication is only performed if the server requires it.\n\n#### `user` and `pasword`\n\n**Type**: `binary()`\n\n**Description**: The meaning is self explanatory. Should be used with `auth`.\n\n#### `timeout`\n\n**Type**: `timeout()`\n\n**Description**: Sets a timeout (in seconds) for the underlying\n  `gen_server`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselectel%2Fpat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fselectel%2Fpat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselectel%2Fpat/lists"}