SendGrid not sending emails on Heroku from default inqury/contact form
This is my first app using RefineryCMS. The way I have sent mail from applications in the past is not currently work with my refinery app.
I have tried numerous ways of doing this by way of numerous searches on the internet and I cannot make this work.
Currently, here is what I have:
In the environment.rb
file I have this:
config.action_mailer.smtp_settings = {
:enable_starttls_auto => true,
:address => 'smtp.sendgrid.net',
:port => '25',
:authentication => :plain,
:user_name => 'myusername@mydomain.com',
:password => 'mypassword',
:domain => 'mydomain'
}
I have also tried:
ActionMailer::Base.smtp_settings = {
:enable_starttls_auto => true,
:address => 'smtp.sendgrid.net',
:port => '25',
:authentication => :plain,
:user_name => 'myusername@mydomain.com',
:password => 'mypassword',
:domain => 'mydomain'
}
I have tried putting these settings in the production and development classes. Tried locally and on heroku but I just can't get the built in inquiry/contact form to send out the notifications emails and I have no idea why it won't work.
Like I said earlier, I have tried every solution (they are all very similar) I can find for this but can't make it work. If somebody could please tell what I am doing wrong and what, exactly, it is I need to do, that would be awesome.
Thanks in advance, ~Mike
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Actually, it was a bug in the existing version of
refinerycms-inquiries
that was causing the mail not to send. once I updated to 0.9.9.9, it worked as expected. In case anyone needs to know how to perform this update:First, add this line to your Gem file:
Then run this command:
and this is all I added to the environment.rb file:
That's it.