Grassroots Email Verification

Today, we’re delving into another aspect of the new automatic trial license creation for our flagship SolidWorks drawing note application, Versa Note. To ensure fast and easy setup, we’ve automated the trial license creation process. Just download & install the application, launch Versa Note in a SolidWorks drawing, provide your email address, and your trial license will be activated with a simple code.

Of course, authentication is key to validating user emails to ward off fake accounts. First and foremost, we needed a bulletproof email verification process. Research led us to existing products, which, though potential time savers, came with costs and data privacy concerns. We opted for a simple, grassroots approach, and decided to create our own bespoke email verification system.

The solution is deceptively simple: generate a random 4 digit code, email the code using our CAD Innovations Gmail account via SMTP, and verify the code is a match based on user input. Sending emails via Gmail SMTP only requires the creation of a Google App password. Select the app type ‘Other’ and provide a relevant name for the app password, then click ‘Generate’.

The code would look something like this, where you’ll use your app password in place of your usual Google password (remember not to store this password in plain text, and consider using a GitHub encrypted secret):

string userEmail = "";

var smtpClient = new SmtpClient("")
   Port = 587,
   Credentials = new NetworkCredential("", "[GOOGLE APP PASSWORD]"), 
      EnableSsl = true,
                   smtpClient.SendMailAsync("", userEmail , "[Email Subject]", "");

Email verification was a key part of our slick new Versa Note trial license feature. While ready-made tools have their place, this ground-up approach was right for us. The method you choose boils down to your specific project needs, and regardless of third-party vs custom, the aim is to serve users flawlessly and safely.