Net::SMTPUnknownError (could not get 3xx (550)) error when sending email on my Rails app - ruby-on-rails

I'm using google for sending emails on my Rails 3.2 app. Most emails functions were working perfectly. Then I did some testing because delayed_job is not working. I got a warning from google that I need to log into the account via the web to unlock it (I sent about 20 emails in a span of 1 hour). Things were back to normal. Now, I am unable to send any emails whatsoever. I have this error message in my server log:
Net::SMTPUnknownError (could not get 3xx (550))
Has Google blacklisted me for sending 50 emails? I changed the password on the account, logged in a few times via the web, restored the settings to exactly what they were when the emails were working.

I got email working again by creating a new email address. Had to create a new one without using an alias for the old one to get it to work. I also created an SPF record entry, which I did not have before.

Related

rails sending bulk mails

We are using Rails 2.3.8 version. In our application, we tend to send individual email to all users ( around 1500 users - Bulk email ). We are not using any services other than Actionmailer. Hence, we cannot use any service (like mailGun, sendGrid, mailchimp, etc) Also, we have our own SMTP server, through which all the mails are sent.
We have added our mailing functionality to be executed in two scenarios.
Rake Task with CRON JOB ( Auto mails to be sent at specific time)
Via controller ( Mails are sent when a button is clicked)
In both the cases, Initially, the mails are forwarded to the users without any issues. As the user count increases, suddenly the mail functionality stops and throws either of the two following errors.
535 5.7.3 Authentication Unsuccessful
Execution expired
Could anyone please help me sort out the issue?
Is there any timeout value that has to be set for SMTP server connectivity? Or are there any restrictions (like number of mails sent per minute) ?
Thanks in Advance

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.

Receiving forwarded emails via SendGrid

I want to use SendGrid to receive emails. Here is my scenario.
User A will send an email from user-a#example.com to User B at user-b#example.org
I've setup a rule so that emails received by User B are forwarded to c#example.net.
example.net is my domain and I have configured example.net in SendGrid to point to an MVC controller which will process the JSON posted by SendGrid.
Is this possible? I was able to receive one email but after that it stopped working. What went wrong? Can any one help me out?
The problem was solved via a different channel. The resolution can be found here: https://community.sendgrid.com/sendgrid/topics/receiving_forwarded_mails_send_grid
Through using a number of debug tools, including RequestBin and Runscope, the user found there was an error in their controller, rather than an error in forwarding or message parsing.
We were able to debug and find the problem which as you predicted was with our controller.
We are still testing by sending mails from various domains but have not come across any mail that is getting lost.
— saurabh abhyankar, May 22nd 10:53 AM GMT

Emails not going from Mandrill to Gmail

I'm trying to send email from my app, emails seem to be going to mandrill correctly and there getting delivered, but I see nothing in my inbox.
I've even tried sending them through my domain and I'm still not getting them. I get them from my live website its using gmail but I want to switch
Using mxtoolbox.com I found
SMTP Reverse DNS Mismatch and
454 4.7.1 Relay access denied which could mean its been marked for spam?
It's sent through emails twice so I'm wondering if theres a time between emails sent or something.
When I was testing this I thought my emails where being dropped by gmail. I found that for some reason there was a very long lag going from Mandril to Gmail. I received all my tests about an hour after Mandril sent them. Hope this helps someone stuck like I was.
Found this question trying to diagnose my issue.
I am using Mandrill and found that sending emails from Mandrill to Gmail will take anywhere from 10 seconds to 15 minutes. Can't establish a reason why sometimes it takes longer.
Mandrill blocks certain domains from being the send address to prevent fraud, but as long as you're sending from an address you know exists to an address you know exists, you should be fine. Also, if that were the problem, the email would bounce rather than send. Also, some email services have policies that prevent you from doing things like sending an email to your address from your address from an external service. Based on that error message you provided, it could be something like that; I would check your provider's policies (and your spam folder).
Not an answer but if you look on your mandrill Outbound activity page and click on the green icon that says Delivered you should see that it says No smtp events.
I don't know why it doesn't send but this show that it hasn't sent.
Or should I say hasn't arrived where it was supposed to.
Update:
On further investigation I found out that the emails weren't sending because I was using my personal email address as the sender from_email: When I changed this to a more business sounding email address it worked. So make something up if you have to, like no-reply#nonsense.com

How do I get the server logs for a Rails 4 application in development?

I am using Devise and it sends out a confirmation email when a new user account is created. Since I am in development, in localhost, it doesn't really send out the email, so I just copy the confirmation link from the server info that appears on the console.
The thing is, as one particular page grew, the amount of information that the server processes after the email is sent became too large for the terminal, the backscroll ends before I reach the link. I checked /log/development.log but it logs other things. I studied the config and debug parts of the rails doc but I couldn't find anything about server logging.
So now I have no way of copying the confirmation link from the console, and no way of confirming new accounts, which I still need to do since it is part of the proposed flow.
How can I get the server logs?

Resources