{"id":22213820,"url":"https://github.com/damir-sijakovic/sendmails","last_synced_at":"2026-04-28T22:34:48.220Z","repository":{"id":135104817,"uuid":"375935801","full_name":"damir-sijakovic/sendmails","owner":"damir-sijakovic","description":"Two functions that send mail with html message and attachment.","archived":false,"fork":false,"pushed_at":"2021-06-11T09:41:26.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T06:26:33.300Z","etag":null,"topics":["attachment","html","mail","php","sendmail"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/damir-sijakovic.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-11T07:07:12.000Z","updated_at":"2021-06-11T09:41:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"c6da9a2e-cba5-4e94-a7ae-a1f413262bb0","html_url":"https://github.com/damir-sijakovic/sendmails","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/damir-sijakovic/sendmails","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damir-sijakovic%2Fsendmails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damir-sijakovic%2Fsendmails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damir-sijakovic%2Fsendmails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damir-sijakovic%2Fsendmails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/damir-sijakovic","download_url":"https://codeload.github.com/damir-sijakovic/sendmails/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damir-sijakovic%2Fsendmails/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32402670,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"last_error":"SSL_read: 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":["attachment","html","mail","php","sendmail"],"created_at":"2024-12-02T21:11:24.560Z","updated_at":"2026-04-28T22:34:48.206Z","avatar_url":"https://github.com/damir-sijakovic.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Send mail functions\n\nTwo functions to send mail with html message and attachment.\n\n\n## sendHtmlMail($to, $from, $subject, $html, \u0026$msg=null)\n\nArguments:  \n\n* to - destination email address\n* from - sender email address\n* subject - email subject\n* html - message in html format (can be plain text)\n* msg - optional arg that pass error message\n\nReturn:\n\nBoolean, error messages are passed through msg reference argument.\n\n\n\n## sendAttachment($to, $from, $subject, $html, $filename, $filepath, \u0026$emsg=null)\n\n* to - destination email address\n* from - sender email address\n* subject - email subject\n* html - message in html format (can be plain text)\n* msg - optional arg that pass error message\n* filename - file name of attachment in email\n* filepath - path to file you want to send\n* emsg - optional arg that pass error message\n\nReturn:\n\nBoolean, error messages are passed through emsg reference argument.\n\n\nExample:\n\n            $msg = '';\n            $html = '\u003chtml\u003e\u003cbody\u003e\u003ch1 style=\"color:red;\"\u003eHello\u003c/h1\u003e\u003cbr\u003e\u003cp style=\"color:green;\"\u003eThis is paragraph.\u003c/p\u003e\u003c/body\u003e\u003c/html\u003e';\n            $sendOk = sendAttachment('destination@fake.fake', 'from@fake.fake', 'hello subject', $html, 'somefile2.pdf', __DIR__ . '/somefile2.pdf', $msg);\n            if (!sendOk)\n            {\n                die($msg);\n            }\n\n## Issues\nAttachments don't work on my webhosts email but do work on gmail. \nSometimes it takes few minutes for mail to appear.\n\n### Have Fun\n`Developed and tested under 5.4.118-1-manjaro/xfce/docker/portainer`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamir-sijakovic%2Fsendmails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdamir-sijakovic%2Fsendmails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamir-sijakovic%2Fsendmails/lists"}