Skip to content

fewlinesco/bamboo_smtp-sandbox

Repository files navigation

BambooSMTP Sandbox

Continuous Integration

Description

This project aims to be a sandbox for developers testing BambooSMTP.

Installation

Once you cloned this project, heads up to mix.exs to set the desired version of BambooSMTP.

# By default, we target the current release.
defp deps do
  [{:bamboo_smtp, "~> 4.0.1"}]
end

# You might want to target a local version on your computer.
defp deps do
  [{:bamboo_smtp, path: "../path/to/bamboo_smtp"}]
end

You will need to set some values as environment variables.

# Create a new file for env vars (based on our sample).
cp .env_vars.sample .env_vars

Then, set the following values in .env_vars:

  • EMAIL_TO: The email address you want to send an email.

  • EMAIL_FROM: The email address that will send the email.

You will find the SMTP configuration options below those values.

If you don’t already have a SMTP server ready, the easiest way is to use Google Portable SMTP.

Using Google Portable SMTP

Requirements:

Once you have all the requirements, you can set the following values:

VAR NAME VALUE

SMTP_SERVER

smtp.gmail.com

SMTP_HOSTNAME

[YOU CAN PUT ANYTHING HERE]

SMTP_PORT

465

SMTP_USERNAME

[YOUR GMAIL ADDRESS]

SMTP_PASSWORD

[YOUR GMAIL PASSWORD]

Usage

The application is intended to be used through iex.

iex -S mix

Once inside iex, you will have access to some functions such as:

# Send a basic email with some default values as subject and text body.
BambooSMTPSandbox.Sender.send_sample_email()

# Send a basic email like above but with some attachments.
BambooSMTPSandbox.Sender.send_sample_email_with_attachments()

Code of Conduct

By participating in this project, you agree to abide by its CODE OF CONDUCT.

Contributing

You can see the specific CONTRIBUTING guide.

License

Bamboo SMTPAdapter is released under The MIT License (MIT).

About

A little sandbox to play with BambooSMTP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages