{"id":39803516,"url":"https://github.com/dag0310/mailer-php-api","last_synced_at":"2026-01-18T12:35:50.592Z","repository":{"id":193397151,"uuid":"688715068","full_name":"dag0310/mailer-php-api","owner":"dag0310","description":"Send emails using an HTTP PHP API using PHPMailer.","archived":false,"fork":false,"pushed_at":"2025-12-17T21:39:03.000Z","size":164,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-21T09:12:29.078Z","etag":null,"topics":["api","email","http","javascript","mailing","php","phpmailer","python"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dag0310.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,"governance":null}},"created_at":"2023-09-08T00:26:17.000Z","updated_at":"2025-12-17T21:39:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"2e6e8aac-c6fd-465d-8404-c2485dee369a","html_url":"https://github.com/dag0310/mailer-php-api","commit_stats":{"total_commits":7,"total_committers":2,"mean_commits":3.5,"dds":0.1428571428571429,"last_synced_commit":"0827795eebe948d9a9a222b22cbadb69bfc1a4c5"},"previous_names":["dag0310/mailer-php-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dag0310/mailer-php-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dag0310%2Fmailer-php-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dag0310%2Fmailer-php-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dag0310%2Fmailer-php-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dag0310%2Fmailer-php-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dag0310","download_url":"https://codeload.github.com/dag0310/mailer-php-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dag0310%2Fmailer-php-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28536002,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T10:13:46.436Z","status":"ssl_error","status_checked_at":"2026-01-18T10:13:11.045Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["api","email","http","javascript","mailing","php","phpmailer","python"],"created_at":"2026-01-18T12:35:50.496Z","updated_at":"2026-01-18T12:35:50.570Z","avatar_url":"https://github.com/dag0310.png","language":"PHP","readme":"# Mailer - PHP API\n\nSend emails using an HTTP PHP API using PHPMailer.\n\n## Installation\n\n- Just copy the `www` folder to your webserver.\n- Make sure to rename `config.template.ini` to `config.ini` and set the fields.\n- Make sure `config.ini` is inaccessible through the web, .htaccess does this already for Apache servers.\n\n## Usage examples\n\n### PHP\n```php\n$headers = [\n    'Content-type: application/x-www-form-urlencoded',\n    \"Authorization: Bearer API_TOKEN_GOES_HERE\",\n];\n\n$data = http_build_query([\n    'to_email': 'john.doe@example.com',\n    'subject': 'Test email',\n    'message_html': 'HTML message body',\n]);\n\n$context = stream_context_create([\n  'http' =\u003e [\n      'method' =\u003e 'POST',\n      'header' =\u003e implode(\"\\r\\n\", $headers),\n      'content' =\u003e $data,\n  ],\n]);\n\n$response = file_get_contents('https://example.com/mailer/', FALSE, $context);\n\nif ($response === FALSE) {\n  die('Error: Unable to send the request.');\n}\n```\n\n### JavaScript\n\n```javascript\nconst options = {\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application/x-www-form-urlencoded',\n    Authorization: 'Bearer API_TOKEN_GOES_HERE'\n  },\n  body: new URLSearchParams({\n    to_email: 'john.doe@example.com',\n    subject: 'Test email',\n    message_html: 'HTML message body',\n  })\n};\n\nfetch('https://example.com/mailer/', options)\n  .then(response =\u003e response.json())\n  .then(response =\u003e console.log(response))\n  .catch(err =\u003e console.error(err));\n```\n\n### Python\n\n```python\nimport http.client\n\nconn = http.client.HTTPSConnection(\"example.com\")\n\npayload = \"to_email=john.doe@example.com\u0026subject=Test%20email\u0026message_html=HTML%20message%20body\"\n\nheaders = {\n    'Content-Type': \"application/x-www-form-urlencoded\",\n    'Authorization': \"Bearer API_TOKEN_GOES_HERE\"\n    }\n\nconn.request(\"POST\", \"/mailer/\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdag0310%2Fmailer-php-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdag0310%2Fmailer-php-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdag0310%2Fmailer-php-api/lists"}