Can i send and receive emails using ActionMailer in development env.? - ruby-on-rails

I am trying to design a email confirmation but not able to receive emails in my gmail account. Can anyone help ?

one-step confirmation in gmail does not work;
you must enable 2-step gmail verification and enable app password;
dotenv doesn't load the passwords to production - you have to feed heroku in CLI heroku config:set var1=value1, etc. or at the link https://dashboard.heroku.com/apps/<your_application>/settings (this last tip does not apply to development).
For a specific trouble, please:
a) detail the code and error; or
b) make available your public repository in github.

Related

Configure Jenkins to send gmail: What am I missing?

Trying to have Jenkins send an email to a Gmail account upon every build. I get:
Failed to send out e-mail
com.sun.mail.smtp.SMTPSendFailedException: 530-5.5.1 Authentication Required. Learn more at
530 5.5.1 https://support.google.com/mail/?p=WantAuthError 9sm5733284oij.25 - gsm
Here's what I tried so far:
Made the gmail account accept emails from less secure apps
Generated an application password from gmail and used it in my Jenkins configuration - got the same error with and without the app password
Looked at at least a dozen answers (yeah) and all the screens showing the Jenkins gmail config look the same as mine
telnet smpt.gmail.com 465 responds as connected
My Jenkins install is localhost using this URL: http://192.168.0.1:8080/
My system admin email address exists and is entered in Jenkins
I've tried filling in the section on Extended E-mail notification and removing the entries - no difference
Turned off Windows Defender, thinking, just maybe???
Also tried to configure Outlook/Hotmail using those smpt parms but that gave different errors
Don't know if this matters but I have that 'It appears that your reverse proxy set up is broken' and I don't recall setting up a reverse proxy!
Any help would be greatly appreciated!
Set up Jenkins email notification as shown below:
To resolve this, create & use app passwords with 2-step verification turned on.
A less secure method is to allow less secure apps without 2-step verification.

Ruby on Rails app fetch bounces How to?

is there any possibility to check with the ActionMailer mail function if a mail-address is still alive?
My problem is that I have a ruby on rails application with lots of users, but some of those changed their mail address and now I got lots of mails back. It would be cool If I can check if the mail is still present, and if not I delete the user from Database.
Any Ideas for this problem?
If you're sending mail and it fails, you can view those if you've configured
raise_delivery_errors = true
That would go in your config/environment/development or production.rb
Sadly though, with raise_delivery_errors there's a gotcha:
This only works if the external email server is configured
for immediate delivery.
If you have the option to use something like mailchimp, sendgrid, etc it handles most of this for you - it won't send to bogus emails, it silences them on future mailings and is just a convenient way to manage your email clickthroughs, etc. Some email services give you a webhook that says "this email bounced" which you can then do something with in your app/database. Or more primitively, you can download a csv periodically from their portal and update the database.

Mandrill Inbound email- setting up Sending Domains with an app hosted on Heroku

I am trying to learn the ins and outs of Mandrill, so I created a test app that has no functionality except creating users, signing them in and out, and clicking on a link that sends the user an e-mail through ActionMailer.
So far all of this works fine. I have configured Mandrill to send e-mail in both development and production (Heroku). What I'm trying to do now is configure it to receive e-mails sent from users and do stuff with them. My problem is that I'm not sure what to add as my mail domain in the Sending Domains section of my Mandrill account page.
I've done this before with an app on Heroku using Mailgun. Mailgun gave me a Mailgun subdomain to use for user testing off the bat (app12345678.mailgun.org). I was able to send mail to postmaster#app12345678.mailgun.org and it worked perfectly. With Mandrill it's proven a bit more difficult.
Mandrill doesn't seem to provide a Mandrill subdomain to start with. I suppose my question is: is it at all possible to get a Mandrill subdomain for testing like the one Mailgun provides? If not, how can I go about user testing inbound e-mail with Mandrill if I don't currently own my own custom domain? What can I use as the Sending Domain?
it's not currently possible to use Mandrill's inbound email routing unless you have a domain/subdomain to work with. We don't provide a testing subdomain to use for inbound routing.
Any domains you actually send from in Mandrill will be added to the Sending Domains page. You don't have to manually enter any domains there, since we'll detect any that you use and show them there automatically. If you want to set up SPF and DKIM for your sending domain, you can manually add it in order to validate the records have been added correctly.
If you have other questions specific to your account, our support team is also happy to help if you want to get in touch via the Support button in your account.

Magento - doesn't send any email

i have a problem with mail sending: magento doesn't send any mail, i'm trying to use the sendfriend functionality (i've extendend the ProductController of that Sendfriend module), but the problem is about any email (i've tried to do a registration or to change a password, but no email was sent). backend settings seems to be ok:
System->Configuration->system->Mail sending settings->disable Email Communications->No;
System->Configuration->system->Mail sending settings->Host ->locahost;
with the same settings on another local magento installation the system send emails correctly. what can i check?
you don't need to do any coding stuff. Its already available in Magento. You just need to enable the option of Email to a friend from the back-end. Hope this help you.

SendGrid implementation with Heroku

We are using Heroku to host our Rails app, and are looking to send out our mail via ActionMailer. I just signed up for SendGrid, paid, and have a fully provisioned account ready to start firing off these emails. How should i go about implementing? through Heroku as an "add-on", or via the Rails documentation found on SendGrid's site?
If you use the add-on, a new SendGrid account will be created with a randomly assigned username and password. Since you already have an account, you will need to reset the relevant Heroku environment variables to your existing credentials if you use the addon. Other than that, there should be no difference between letting Heroku generate the settings or doing it by hand.
Edit: Another difference is that if you use the addon, billing works a little differently. Heroku cannot currently bill overages, so if you are on a 40,000 email credits / month plan, that 40,000 is a hard limit. If your account is via SendGrid.com, it's a soft limit that allows you to pay overages if you send more mail.

Resources