{"id":14990043,"url":"https://github.com/matthewt53/very-simple-smtps","last_synced_at":"2025-04-12T02:03:39.670Z","repository":{"id":21462001,"uuid":"92812197","full_name":"matthewT53/Very-Simple-SMTPS","owner":"matthewT53","description":"A small library written in c++ that uses libcurl to be able to send emails with binary attachments.","archived":false,"fork":false,"pushed_at":"2023-11-14T13:55:48.000Z","size":280,"stargazers_count":10,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T02:03:34.182Z","etag":null,"topics":["binary-attachments","cpp","libcurl","smtp","smtp-client","smtp-library","smtplib","smtps","smtps-client"],"latest_commit_sha":null,"homepage":"","language":"C++","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/matthewT53.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":"2017-05-30T08:22:17.000Z","updated_at":"2024-02-21T16:00:18.000Z","dependencies_parsed_at":"2023-11-14T14:54:02.776Z","dependency_job_id":null,"html_url":"https://github.com/matthewT53/Very-Simple-SMTPS","commit_stats":{"total_commits":47,"total_committers":2,"mean_commits":23.5,"dds":0.04255319148936165,"last_synced_commit":"f438e5be7ef18dd64ff0616445d324560e248079"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewT53%2FVery-Simple-SMTPS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewT53%2FVery-Simple-SMTPS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewT53%2FVery-Simple-SMTPS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewT53%2FVery-Simple-SMTPS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matthewT53","download_url":"https://codeload.github.com/matthewT53/Very-Simple-SMTPS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248505863,"owners_count":21115354,"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":["binary-attachments","cpp","libcurl","smtp","smtp-client","smtp-library","smtplib","smtps","smtps-client"],"created_at":"2024-09-24T14:19:22.629Z","updated_at":"2025-04-12T02:03:39.642Z","avatar_url":"https://github.com/matthewT53.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Very-Simple-SMTPS\n\n[![Build Status](http://ec2-52-63-33-178.ap-southeast-2.compute.amazonaws.com:31580/api/badges/matthewT53/Very-Simple-SMTPS/status.svg?ref=refs/heads/main)](http://ec2-52-63-33-178.ap-southeast-2.compute.amazonaws.com:31580/matthewT53/Very-Simple-SMTPS)\n\n![smtps-image](docs/readme_image.jpg)\n\n## Contents:\n- [About](#about)\n- [Features](#features)\n- [How to use](#how-to-use)\n    - [Conancenter](#conancenter)\n    - [Download release](#download-a-release)\n    - [Example usage](#example-usage)\n- [How to build](#how-to-build)\n    - [Scripts](#scripts)\n    - [Building](#building)\n    - [Testing](#testing)\n    - [Example](#example)\n    - [Clean up](#clean-up)\n- [SMTPS server providers](#smtps-server-providers)\n    - [Amazon](#amazon-ses)\n    - [Google](#google)\n\n## About:\n\nA small library written in modern C++ that can be used to send emails with binary attachments.\n\n## Features:\n### SMTP authentication:\n\nThis library currently only supports the `LOGIN/PLAIN` SMTP authentication method which means you will need to supply your `username` and `password` for your email account when you're sending emails with this library.\n\n## How to use:\n\nThis library can be integrated into your project by using the `conan package manager` or by downloading a release and copying this library's code into your project.\n\n### Conancenter:\nAdd the following line into your conanfile.txt:\n\n```config\n[requires]\nvery-simple-smtps/1.0.0\n```\n\nThis package can be installed into the project with: `conan install conanfile.txt --build=missing`\n\nMore info can be found on the [conan-center package page](https://conan.io/center/recipes/very-simple-smtps?version=1.0.0).\n\n### Download a release:\nGrab the latest release from [here](https://github.com/matthewT53/Very-Simple-SMTPS/releases/tag/v1.0.0).\n\nYou can build a release version of this library by following the instructions [below](#how-to-build).\n\nCopy over the `include` folder into your own project and copy either the `libsmtp_lib.so` or `libsmtp_lib.a` library file that was built under `.conan/src` into your own project and link with it. Best of luck!\n\n### Example usage:\n```c++\n#include \"attachment/attachment.hpp\"\n#include \"email/email.hpp\"\n\nusing namespace smtp;\n\nint main(void) {\n  EmailParams params{\n      \"gmail_account@gmail.com\",         // smtp username\n      \"google_app_password\",             // smtp password\n      \"smtps://smtp.gmail.com:465\",      // smtp server\n      \"target@gmail.com\",                // to\n      \"gmail_account@gmail.com\",         // from\n      \"\",                                // cc\n      \"Testing sending attachments\",     // subject\n      \"Hey listen friend here are some attachments for you to play with!\", // body\n  };\n  Email e{params};\n\n  Attachment a{\"mountain-beach.jpg\"};\n  Attachment a2{\"mountain-beach2.jpg\"};\n  e.addAttachment(a);\n  e.addAttachment(a2);\n\n  e.send();\n\n  return 0;\n}\n```\n\n## How to build:\n### Scripts:\n\nThe scripts below need to be run from the project root i.e `./Very-Simple-SMTPS`\n\n```bash\n$ ./scripts/venv.sh     # Creates or starts the python virtual environment required to build and run tests\n$ ./scripts/setup.sh    # Installs tools required to build and run this project\n$ ./scripts/build.sh    # Builds the library\n$ ./scripts/test.sh     # Runs the tests\n$ ./scripts/cleanup.sh  # Removes build artifacts\n```\n\n### Build profiles:\nThis library can be built in either release mode or debug mode and can be built as a shared or static library.\n\nTo switch between `shared` or `static` builds, the build profiles under `./profiles` can be modified by setting the `shared` variable under **[options]** to `False` or `True`.\n\nThe steps below will show you how to build in either `debug` or `release` mode.\n\n### Building:\n- [Optional] Consider running the `./scripts/setup.sh` script to install tools required for building.\n- To build, this project relies on the [conan package manager](https://docs.conan.io/1/introduction.html) and [meson](https://mesonbuild.com/).\n- The virtual environment needs to be created and the user needs to have activated this virtual environment before this library can be built.\n```bash\n# create or activate python virtual env\n$ source ./scripts/venv.sh\n\n# build the library and tests in DEBUG mode by default\n$ ./scripts/build.sh\n\n# build the library and tests in RELEASE mode\n$ ./scripts/build.sh release\n```\n\n### Testing:\n- The unit testing framework used is [doctest](https://github.com/doctest/doctest)\n- To run the tests:\n```bash\n$ ./scripts/test.sh\n```\n\n### Example:\n- There is an example of how to send an email with attachments under `./examples/send_attachments.cpp`\n- Fill in the credentials and you should be good to go!\n- To run the example:\n```bash\n$ ./.conan/examples/examples\n```\n\n### Clean up:\n- Remove all build artifacts:\n```bash\n$ ./scripts/cleanup.sh\n```\n\n## SMTPS server providers:\n### Amazon SES:\n- This library has been tested against Amazon SES's SMTPS servers.\n- Sender and receiver email addresses do need to be registered and verified in the AWS SES product.\n- One of the many SMTPS servers: `smtps://email-smtp.ap-southeast-2.amazonaws.com:465`\n\n### Google:\n- Google doesn't seem to allow access to `less secure apps` anymore.\n- To use Google's SMTPS server, two step verification needs to be enabled on the Gmail account.\n- Once this has been enabled, we can create an `App password`.\n- This password will be used as the SMTP password.\n- The SMTP username is the Gmail address.\n- SMTPS server: `smtps://smtp.gmail.com:465`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthewt53%2Fvery-simple-smtps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatthewt53%2Fvery-simple-smtps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthewt53%2Fvery-simple-smtps/lists"}