In the config there’re only 2 keys related to SES and both are optional
# Region for the Amazon Simple Email Service, SES. Leave blank if
# SES not used
aws_ses_region:
# Verified email addresses created in SES are subscribed to send
# complaints and bounces to this SNS topic. Leave blank is SES not
# used.
aws_ses_sns_topic:
How to set up? Should I use “mail_delivery_method: smtp”?
NoMethodError: undefined method `locale' for #<Person::ActiveRecord_Relation:0x005560347989b8>
Did you mean? lock_value
from app/mailers/person_mailer.rb:317:in `welcome_email'
from (irb):7
And this is the code:
def welcome_email(person, community, regular_email=nil, test_email=false)
@recipient = person
recipient = person
with_locale(recipient.locale, community.locales.map(&:to_sym), community.id) do #<--- #317
@current_community = community
p1 = Person.where(....).first
irb(main):055:0* a1 = PersonMailer.welcome_email(p1, Community.first).deliver_now!
ArgumentError: Error(s) in /home/user123/my_app/app/services/email_service/email_service_injector.rb:21:in `new': sns_topic: Missing mandatory value.
from app/utils/entity_utils.rb:377:in `block in build'
from app/utils/entity_utils.rb:423:in `with_result'
from app/utils/entity_utils.rb:369:in `build'
from app/services/email_service/ses/client.rb:17:in `initialize'
from app/services/email_service/email_service_injector.rb:21:in `new'
from app/services/email_service/email_service_injector.rb:21:in `build_ses_client'
from app/services/email_service/email_service_injector.rb:13:in `build_addresses_api'
from app/services/email_service/email_service_injector.rb:3:in `addresses_api'
from app/services/email_service/api/api.rb:6:in `addresses'
from app/utils/mail_utils.rb:82:in `community_specific_sender'
from app/mailers/person_mailer.rb:336:in `block in welcome_email'
from app/utils/mail_utils.rb:25:in `block (2 levels) in with_locale'
from app/utils/mail_utils.rb:72:in `set_community'
from app/utils/mail_utils.rb:24:in `block in with_locale'
from app/utils/mail_utils.rb:52:in `set_locale'
from app/utils/mail_utils.rb:23:in `with_locale'
from app/mailers/person_mailer.rb:317:in `welcome_email
irb(main):005:0> a1 = PersonMailer.welcome_email(p1, Community.first).deliver_now!
{"tag":"action_mailer","free":"Delivering email","type":"delivering_email","structured":{"to":[],"from":["aabbcc@my_domain123.com"],"subject":"Welcome to Sharetribe"}}
ArgumentError: SMTP To address may not be blank: []
from (irb):5
Thanks. It’s working, but not completely - only emails belonding to my domain will come through.
When I’m using the emails that don’t belong to my domain such as - fdsafdsaf@fdsaf222dsfd.com and that exist in my db - I got this:
Net::SMTPFatalError: 554 Message rejected: Email address is not verified.
The following identities failed the check in region US-WEST-2: my_email@my_other_domain456.com
This has to do with my settings at Amazon and not my app, right?
Looks like as if it was trying to use person’s email to authenticate at amazon.