{"id":13858775,"url":"https://github.com/foca/sinatra-mailer","last_synced_at":"2025-08-24T16:10:58.197Z","repository":{"id":417664,"uuid":"37363","full_name":"foca/sinatra-mailer","owner":"foca","description":"Send emails from Sinatra in a very simple way","archived":false,"fork":false,"pushed_at":"2008-07-26T04:07:04.000Z","size":85,"stargazers_count":58,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-03T17:17:59.186Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/foca.png","metadata":{"files":{"readme":"README.markdown","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":"2008-07-26T04:06:47.000Z","updated_at":"2023-09-08T16:24:55.000Z","dependencies_parsed_at":"2022-08-16T10:25:09.509Z","dependency_job_id":null,"html_url":"https://github.com/foca/sinatra-mailer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/foca/sinatra-mailer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foca%2Fsinatra-mailer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foca%2Fsinatra-mailer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foca%2Fsinatra-mailer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foca%2Fsinatra-mailer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foca","download_url":"https://codeload.github.com/foca/sinatra-mailer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foca%2Fsinatra-mailer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271901081,"owners_count":24841115,"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","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-08-05T03:02:20.319Z","updated_at":"2025-08-24T16:10:58.158Z","avatar_url":"https://github.com/foca.png","language":"Ruby","funding_links":[],"categories":["Ruby","Email"],"sub_categories":[],"readme":"Sinatra::Mailer\n===============\n\nAdds an `email` method to your email handlers, that receives a hash of values\nto create your email.\n\nFor example:\n\n    post \"/signup\" do\n      # sign up the user, and then:\n      email :to      =\u003e @user.email, \n            :from    =\u003e \"awesomeness@example.com\", \n            :subject =\u003e \"Welcome to Awesomeness!\",\n            :body    =\u003e haml(:some_template)\n    end\n\nConfiguration\n=============\n\nThis plugin is very dirty yet :) Since it's just a port to Sinatra of\n[Merb::Mailer][merb-mailer]. So the configuration is not Sinatra-y, yet.\nBut we'll get to that. \n\nUsing SMTP\n----------\n\n    Sinatra::Mailer.config = {\n      :host   =\u003e 'smtp.yourserver.com',\n      :port   =\u003e '25',\n      :user   =\u003e 'user',\n      :pass   =\u003e 'pass',\n      :auth   =\u003e :plain # :plain, :login, :cram_md5, the default is no auth\n      :domain =\u003e \"localhost.localdomain\" # the HELO domain provided by the client to the server\n    }\n\nUsing Gmail SMTP\n----------------\n\nYou need [smtp-tls][], a gem that improves `net/smtp` to add support for secure\nservers such as Gmail.\n\n    require \"smtp-tls\"\n    \n    Sinatra::Mailer.config = {\n      :host =\u003e 'smtp.gmail.com',\n      :port =\u003e '587',\n      :user =\u003e 'user@gmail.com',\n      :pass =\u003e 'pass',\n      :auth =\u003e :plain\n    }\n    \nMake sure that when you call your `email` method you pass the `:text` option \nand not `:body`.\n\nUsing sendmail\n--------------\n\n    Sinatra::Mailer.config = {:sendmail_path =\u003e '/somewhere/odd'}\n    Sinatra::Mailer.delivery_method = :sendmail\n\nCredits\n=======\n\nThis has been blatantly adapted from [Merb::Mailer][merb-mailer], so all credit\nis theirs, I just ported it to [Sinatra][].\n\n[merb-mailer]: http://github.com/wycats/merb-more/tree/master/merb-mailer\n[smtp-tls]: http://github.com/ambethia/smtp-tls/tree/master\n[Sinatra]: http://sinatrarb.com","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoca%2Fsinatra-mailer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoca%2Fsinatra-mailer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoca%2Fsinatra-mailer/lists"}