Skip to content

Instantly share code, notes, and snippets.

@DevGW
Last active April 11, 2023 20:05
Show Gist options
  • Save DevGW/ec4678b572c20cecfa8f3904b2d34143 to your computer and use it in GitHub Desktop.
Save DevGW/ec4678b572c20cecfa8f3904b2d34143 to your computer and use it in GitHub Desktop.
Rails console send email #hha_ank #rails
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
address: 'smtp.gmail.com',
port: 587,
domain: 'gmail.com',
authentication: 'plain',
enable_starttls_auto: true,
user_name: 'your@gmail.com',
password: 'yourpassword'
}
ActionMailer::Base.mail(
from: "TempusETimesheets@annkissam.com",
to: "jasonbecht@gmail.com",
subject: "New Test",
body: "Testing for the fourth time"
).deliver_now
UserMailer.activation_instructions(@user).deliver_now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment