{"id":18069218,"url":"https://github.com/dliocode/sendemail","last_synced_at":"2026-01-18T20:32:46.240Z","repository":{"id":55061275,"uuid":"305878388","full_name":"dliocode/sendemail","owner":"dliocode","description":"Function to send email for Delphi.","archived":false,"fork":false,"pushed_at":"2023-06-21T17:00:35.000Z","size":5208,"stargazers_count":70,"open_issues_count":0,"forks_count":30,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-05T16:18:24.991Z","etag":null,"topics":["delphi","email","idsmtp","indy","log","logger","mail","pascal","sendemail","smtp"],"latest_commit_sha":null,"homepage":"","language":"Pascal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dliocode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-21T01:43:24.000Z","updated_at":"2025-03-07T16:55:03.000Z","dependencies_parsed_at":"2023-01-20T11:17:54.652Z","dependency_job_id":null,"html_url":"https://github.com/dliocode/sendemail","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/dliocode/sendemail","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dliocode%2Fsendemail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dliocode%2Fsendemail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dliocode%2Fsendemail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dliocode%2Fsendemail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dliocode","download_url":"https://codeload.github.com/dliocode/sendemail/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dliocode%2Fsendemail/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28549833,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T19:56:05.265Z","status":"ssl_error","status_checked_at":"2026-01-18T19:55:54.685Z","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":["delphi","email","idsmtp","indy","log","logger","mail","pascal","sendemail","smtp"],"created_at":"2024-10-31T08:09:37.007Z","updated_at":"2026-01-18T20:32:46.212Z","avatar_url":"https://github.com/dliocode.png","language":"Pascal","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://user-images.githubusercontent.com/54585337/123355484-2296e300-d53c-11eb-8d87-698741a9def5.png\"\u003e\n    \u003cimg alt=\"datalogger\" src=\"https://user-images.githubusercontent.com/54585337/123355484-2296e300-d53c-11eb-8d87-698741a9def5.png\"\u003e\n  \u003c/a\u003e  \n\u003c/p\u003e\n\u003cbr\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/v/release/dliocode/sendemail?style=flat-square\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/stars/dliocode/sendemail?style=flat-square\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/forks/dliocode/sendemail?style=flat-square\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/contributors/dliocode/sendemail?color=orange\u0026style=flat-square\"\u003e\n  \u003cimg src=\"https://tokei.rs/b1/github/dliocode/sendemail?color=red\u0026category=lines\"\u003e\n  \u003cimg src=\"https://tokei.rs/b1/github/dliocode/sendemail?color=green\u0026category=code\"\u003e\n  \u003cimg src=\"https://tokei.rs/b1/github/dliocode/sendemail?color=yellow\u0026category=files\"\u003e\n\u003c/p\u003e\n\n## SendEmail\n\nFunction to send email for Delphi.\n\nSupport: developer.dlio@gmail.com\n\n:fast_forward: Here is an example [Samples](https://github.com/dliocode/sendemail/tree/main/samples)\n\n## :warning: Usage\n\n### :green_book: Mode: Simple\n\n```delphi\nuses\n  SendEmail;\n\nbegin\n  TSendEmail.New\n    .From('Email', 'Name')\n    .AddTo('Email', 'Name')\n    .AddReceiptRecipient('Email', 'Name') // Confirmation Read\n    .AddReplyTo('Email', 'Name')          // Answer to\n    .AddCC('Email', 'Name')\n    .AddBCC('Email', 'Name')\n    .Priority(TPriority.mpNormal)\n    .Subject('My Text with SendEmail')\n    .Message('\u003ch1\u003eMessage\u003c/h1\u003e', True) // True is Default = Text in HTML\n    .AddAttachment('')\n    .Host('email@domain.com')\n    .Port(587)\n    .Auth(True)\n    .UserName('username')\n    .Password('password')\n    .SSL(False)\n    .TLS(False)\n    .Send(True); // True is Default = After sending it will be disconnected\nend.\n```\n\n### :orange_book: Mode: With logger\n\n```delphi\nuses\n  SendEmail;\n\nbegin\n  TSendEmail.New\n    .OnLog(\n    procedure(ALog: string)\n    begin\n      Writeln(Format('%s ' + ALog, [FormatDateTime('dd/mm/yyyy hh:MM:ss', Now)]));\n    end,\n    TLogMode.lmLib) // Options: lmComponent, lmLib, lmAll, lmNone\n    .From('Email', 'Name')\n    .AddTo('Email', 'Name')\n    .AddReceiptRecipient('Email', 'Name') // Confirmation Read\n    .AddReplyTo('Email', 'Name')          // Answer to\n    .AddCC('Email', 'Name')\n    .AddBCC('Email', 'Name')\n    .Priority(TPriority.mpNormal)\n    .Subject('My Text with SendEmail')\n    .Message('\u003ch1\u003eMessage\u003c/h1\u003e', True) // True is Default = Text in HTML\n    .AddAttachment('')\n    .Host('email@domain.com')\n    .Port(587)\n    .Auth(True)\n    .UserName('username')\n    .Password('password')\n    .SSL(False)\n    .TLS(False)\n    .Send(True); // True is Default = After sending it will be disconnected\nend. \n```\n\n### :closed_book: Mode: With progress bar\n\n```delphi\nuses\n  SendEmail;\n\nbegin\n  TSendEmail.New\n    .OnWorkBegin(\n    procedure(ACountMax: Int64)\n    begin\n      ProgressBar.Max := ACountMax;\n      ProgressBar.Position := 0;\n      ProgressBar.Refresh;\n    end)\n    .OnWork(\n    procedure(ACount: Int64)\n    begin\n      ProgressBar.Position := ACount;\n      ProgressBar.Refresh;\n    end)\n    .OnWorkEnd(\n    procedure\n    begin\n      ProgressBar.Position := ProgressBar.Max;\n      ProgressBar.Refresh;\n    end)\n    .From('Email', 'Name')\n    .AddTo('Email', 'Name')\n    .AddReceiptRecipient('Email', 'Name') // Confirmation Read\n    .AddReplyTo('Email', 'Name')          // Answer to\n    .AddCC('Email', 'Name')\n    .AddBCC('Email', 'Name')\n    .Priority(TPriority.mpNormal)\n    .Subject('My Text with SendEmail')\n    .Message('\u003ch1\u003eMessage\u003c/h1\u003e', True) // True is Default = Text in HTML\n    .AddAttachment('')\n    .Host('email@domain.com')\n    .Port(587)\n    .Auth(True)\n    .UserName('username')\n    .Password('password')\n    .SSL(False)\n    .TLS(False)\n    .Send(True); // True is Default = After sending it will be disconnected\nend.\n```\n\n### :notebook_with_decorative_cover: Send asynchronous mode\n\n```delphi\nuses\n  SendEmail;\n\nbegin\n  TSendEmail.New\n    .From('Email', 'Name')\n    .AddTo('Email', 'Name')\n    .AddReceiptRecipient('Email', 'Name') // Confirmation Read\n    .AddReplyTo('Email', 'Name')          // Answer to\n    .AddCC('Email', 'Name')\n    .AddBCC('Email', 'Name')\n    .Priority(TPriority.mpNormal)\n    .Subject('My Text with SendEmail')\n    .Message('\u003ch1\u003eMessage\u003c/h1\u003e', True) // True is Default = Text in HTML\n    .AddAttachment('')\n    .Host('email@domain.com')\n    .Port(587)\n    .Auth(True)\n    .UserName('username')\n    .Password('password')\n    .SSL(False)\n    .TLS(False)\n    .SendAsync(\n    procedure(AErro: Boolean; AMessageErro: string) // Informed callback to return\n    begin\n      if AErro then\n        ShowMessage(AMessageErro)\n      else\n        ShowMessage('Message sent!')\n    end, True); // True is Default = After sending it will be disconnected\nend.\n```\n\n\n## :satellite: Host SMTP\n\n| **Name** | **Host** | **Port** | **Cryptography** | **Auth** |\n|  :---: |  :---: |  :---: |  :---: | :---: |\n| Gmail  | smtp.gmail.com | 465 | SSL/TLS | Yes |\n| Outlook or Office 365  | smtp.office365.com | 587 | TLS | Yes |\n| Hotmail | smtp.live.com | 587 | TLS | Yes |\n| Yahoo | smtp.mail.yahoo.com.br | 587 | TLS | Yes |\n| SendGrid | smtp.sendgrid.net | 465 | TLS | Yes |\n| LocalWeb | email-ssl.com.br | 465 | TLS | Yes |\n| SparkPost | smtp.sparkpostmail.com | 587 | TLS | Yes |\n| Elastic Email | smtp.elasticemail.com | 587 | None | Yes |\n| Mail | smtp.mail.ru | 465  | SSL/TLS | Yes |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdliocode%2Fsendemail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdliocode%2Fsendemail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdliocode%2Fsendemail/lists"}