Giter Site home page Giter Site logo

codemailer's Introduction

APRENDENDO A DESENVOLVER UM MAILER UTILIZANDO API DE TERCEIROS

O projeto está desenvolvido em Rails 4.2

IMPORTANT

email: [email protected]

Detalhes da aplicação

Sample Posts App to use as a starting point in 3IBit, SoulCode, LifeLovePet Rails.

Models:

The app contains only 2 models:

1 - User.rb
2 - Post.rb

Users table has the following fields: t.string :email

t.string   :encrypted_password
t.string   :reset_password_token
t.datetime :reset_password_sent_at
t.datetime :remember_created_at
t.integer  :sign_in_count
t.datetime :current_sign_in_at
t.datetime :last_sign_in_at
t.string   :current_sign_in_ip
t.string   :last_sign_in_ip

t.timestamps

Posts table has the following fields:

t.text :content

t.integer :user_id
t.timestamps

Relationships:

User.rb - > has_many :posts, dependent: :destroy Post.rb - > belongs_to :user

Gems:

Bootstrap Simple Form Devise

Creating the user MAILER

rails g mailer user_mailer

Preview

localhost:3000/rails/mailers/user_mailer/welcome_email_preview

SETTING UP A MANDRILL ACCOUNT

mandrill.com/ Sign up On the settings tab create a new api key and take note of the following details: 1 - host 2 - username 3 - password (api key)

Added in Gemfile gem ‘dotenv-rails’, :groups => [:development, :test]

create file .env

touch .env

in mailchimp, click em Account(picture) -> Transactional -> Mandrill -> Launch Mandrill

codemailer's People

Contributors

tiagom87 avatar luiscdias avatar pacafs avatar

Watchers

Rodolfo Peixoto avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.