Alternative to Less Secure Apps Gmail (2022)

Google announced that it shut down its less secure apps platform by 30th May 2022. Is this bad news for users?4 min


61
61 shares, 61 points

In this article, we will learn about how to use Gmail or SMTP alternative Zoho with java technology.

If you have used Less Secure Apps by Google to send an email from your Java, Javascript, PHP, or other technology used for your applications, you probably encountered Less secure app in your developer life. You turned on the allow secure apps toggle button in order to use free SMTP services for sure.

As we all know, google is giant in technology industries and they might have security aspects; so usually, they update their policies frequently every 6 to 12 months.

But the sad news about google’s less secure apps is that Google deprecated or shut down “Less Secure Apps access” from your google account permanently to reduce vulnerabilities to your google account. To make your account more secure and with 0 vulnerabilities, they decided to stop supporting third-party applications which are just using email and passwords for authentication and using the SMTP services through their application on May 30, 2022. You can read more about Security Standards updated by Google on their support docs.

Is this bad news for users?

No, it is nothing bad! B+ (Be Positive)

Developers get an opportunity to see how big is our world! They can get a chance to explore what is going on with the market, what people are using, what technology is trending nowadays etc.! So let’s take it positively, heads up, and move ahead with the new things!

Problem: I was using google SMTP email services for my 4 live applications and everything was working up to 5th June 2022, I kept continuing the services even after 30th May 2022. But suddenly I figured out that I wasn’t getting an email for resetting passwords or new user registration or other application-level emails on 6th June. It was showing a page as depicted below saying the services are no longer accessible (The on/off toggle button was also gone).

Less secure app access — policy updated by google | Image by Author

I got policy updates since long back as google’s work is always perfect. I planned to look for alternative free SMTP services So I kept the backup plan to move with Zoho Mail.


Cover Image Credits: Alternative to Less Secure Apps, Exploring Zoho Mail for your Application Mail Services — Image By Author Rakshit Shah | (Edited with MS Powerpoint)

Solution: Alternative to GMAIL SMTP with Less Secure Apps

I explored free, stable, and sustainable services from different third-party providers like

  • ZOHO
  • Proton Mail
  • Microsoft Outlook
  • Mail dot com

You can find lots of varieties on the internet, but the best is always admired!

Zoho Mail — Alternative for Gmail or Less Secure Apps

Another Giant in SMTP, ERP, and CRM Solutions is ZOHO. They provided lots of services like Finance, Sales and marketing, Email, IT & Helpdesk services, and many more to their 400M+ Customers (Including many businesses and individuals) for a long back and it is a trustworthy, clean interface, neatly organized stream features, and is easy to integrate with effective and immediate response capabilities, Zoho is providing better services to their clients/consumers/customers.

Image: ZOHO MAIL website landing page — taken by the author to introduce Zoho mail

Image: ZOHO MAIL website landing page — taken by the author to introduce Zoho mail

Key benefits of using Zoho Mail:

  • End-to-end and S/MIME encryption
  • 24x7 Support via email, chat and call
  • Mobile App for your easy access
  • Free access to Zoho products (Notebook, Zoho Docs, and Work drive)
  • 99.9% uptime guarantee
  • 5 GB space per user you create on ZOHO
  • Automatic mail forwarding to your users or customers.
  • Filter, search, and manage Emails using Zoho Streams
  • Group Account creation with user roles & access permissions
  • For your website email, use ZOHO for free forever (It will also avoid scam scores for your website, saying that you are not using free email — for Gmail, it was counting it as free mail, which means scam website)

You will love their “Free Forever” plan for sure!

Configure Zoho with your application: Ultimate Guide

First, you need an email to sign up for ZOHO mail and after that, you can follow the steps given below:

Step 1: Sign up & Verify your email

Zoho Mail sign-up screen — Image by Author

Go to the Zoho Signup page and fill up all mandatory details. Check your registered email to get a verification email, click the link to verify that you are a real user.

Once you created your account, you will be logged in and navigated to the Zoho dashboard. The left highlighted menu is really important and we need to proceed further with it.

Zoho dashboard — admin console | Image by AuthorStep 2: Fill up your organization information (Or individual information)

Organization Zoho mail — Image by Author

It is not mandatory, but if you fill-up the mandatory details, it will help you grow when you expand your business. Go through all pages given in the middle section of the page, highlighted in the above section.

Step 3: Add domain and verify ownership

Click on add button and enter your domain name information.

You can read readymade steps to verify domain ownership using this link.

Basically, you need to go through and read the following details and update TXT, MX, and DMARC records in your domain registrar. Feel free to contact me for any work or any help at an affordable & cheap price.

Email hosting setup steps — Zoho mail | Image by author

You can create new users (with your verified domain name) by reading and following these steps.

Probably your registrar services make some time to reflect the entry you added for MX, TXT, SPF, or DMARC records, so please be patient!

Once you are done following all the steps to configure your email address on Zoho, you are ready to proceed with Java integration in a few steps.

Implementation in java to integrate and send an email

Prerequisites: Javax.mail library must be imported into your config path.

You can integrate send mail feature integrated with Zoho, in a few minutes.

 import java.util.Properties;

import javax.mail.MessagingException;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;

public class ZohoMailTest 
{   public static void main(String[] args) 
    {   Properties properties = new Properties();
        properties.setProperty("mail.smtp.host", "smtp.zoho.in");
//        properties.setProperty("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory"); // If ssl is your concern, uncomment this line
        properties.setProperty("mail.smtp.socketFactory.fallback", "true");
        properties.setProperty("mail.smtp.port", "465");//HTTP - 587 , HTTPS - 465
        properties.setProperty("mail.smtp.socketFactory.port", "465");
        properties.setProperty("mail.smtp.ssl.trust", "smtp.zoho.in");
        properties.put("mail.smtp.starttls.enable", "true");
        properties.put("mail.smtp.auth", "true");
        properties.put("mail.debug", "true");
        properties.put("mail.store.protocol", "pop3");
        properties.put("mail.transport.protocol", "smtp");
        properties.put("mail.debug.auth", "true");
        properties.setProperty( "mail.pop3.socketFactory.fallback", "false");
        Session session = Session.getDefaultInstance(properties,new javax.mail.Authenticator() 
        {   @Override
            protected PasswordAuthentication getPasswordAuthentication() 
            {   
              //TODO - update your zoho credentials first
                return new PasswordAuthentication("","");
            }
        });
        try 
        {   MimeMessage message = new MimeMessage(session);
            message.setFrom(new InternetAddress("microworkerbees@digitalworkerbees.com")); //From address
            message.setRecipients(MimeMessage.RecipientType.TO,InternetAddress.parse("rakshitshah1994@gmail.com")); //To address
            message.setSubject("Testing wonderful application integrated with Zoho mail!");
            message.setText("Received an email successfully! ZOHO + Java Integration works successfully.");
            Transport.send(message);
            System.out.println("----------MAIL SENT-----------");
        } 
        catch (MessagingException e) 
        {   e.printStackTrace();
        }
    }
}

Don’t forget to update <YOUR ZOHO EMAIL ADDREESS> with your Zoho email address, and <YOUR ZOHO EMAIL PASSWORD> with your Zoho email password.

Compile your java class and run it and observe your email address provided in the “TO” recipient.

“Trust me, it will never show email in your spam directory!”

Bingo! You did it! 👏👏👏


References:

[1]. Google Less Secure Apps Update

[2]. Maven Javax Mail jar

[3]. Zoho — Add & verify Domain steps

[4]. Zoho- Add & manage users

Become a Medium member if you want to read more interesting stories like this. It will cost you $5/Month or $50/Year and provides you unlimited access to Medium stories. I will receive a small commission when you use my membership link for signup.

If you find joy and value in what I do, please consider supporting my work with a donation — however much you can afford, it means and helps more than you can imagine.


© Originally published on Medium - less secure app alternative by Author Rakshit Shah.


Like it? Share with your friends!

61
61 shares, 61 points
DigitalWorkerBees
We provide access to businesses and individuals to tons of on-demand virtual workforce. Complete easy-to-do tasks at an affordable cost and get paid in USD.

0 Comments

Your email address will not be published. Required fields are marked *

Choose A Format
Story
Formatted Text with Embeds and Visuals
Poll
Voting to make decisions or determine opinions
List
The Classic Internet Listicles
Countdown
The Classic Internet Countdowns
Open List
Submit your own item and vote up for the best submission
Ranked List
Upvote or downvote to decide the best list item