<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Andriy Zapisotskyi</title>
    <description>The latest articles on Forem by Andriy Zapisotskyi (@azapisotskyi).</description>
    <link>https://forem.com/azapisotskyi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F251276%2F85c7453b-7306-44c4-ae81-552ddca59c4a.png</url>
      <title>Forem: Andriy Zapisotskyi</title>
      <link>https://forem.com/azapisotskyi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/azapisotskyi"/>
    <language>en</language>
    <item>
      <title>Wet VS Electric VS Digital Signatures: What Developers Should Know</title>
      <dc:creator>Andriy Zapisotskyi</dc:creator>
      <pubDate>Mon, 09 Aug 2021 08:38:40 +0000</pubDate>
      <link>https://forem.com/azapisotskyi/wet-vs-electric-vs-digital-signatures-what-developers-should-know-4p0a</link>
      <guid>https://forem.com/azapisotskyi/wet-vs-electric-vs-digital-signatures-what-developers-should-know-4p0a</guid>
      <description>&lt;p&gt;How long did the process of signing and delivering documents take, let’s say, 10 years ago? And how long does it take now? We all know that many documents require a signature. But if before the only way to sign agreements was by hand, digitalization has taken the signing process to a whole new level.&lt;/p&gt;

&lt;p&gt;Let’s discover the definitions of wet signatures as well as electronic and digital ones, their differences, and when you can use each of them to authorize documents.&lt;/p&gt;

&lt;h2&gt;
  
  
  The definition of a wet signature
&lt;/h2&gt;

&lt;p&gt;When a person physically marks a document either with a pen, name seal, or another writing device, he is leaving a wet signature.&lt;/p&gt;

&lt;p&gt;It does not necessarily need to be a person’s name written with an ink pen. Everything from stamp marks, seals, cursive, or just an “X” is legally distinguished as a wet signature as long as it is physically done. Depending on the company, rules might still vary, hence it is usually advised to check before signing a document to ensure your signature is valid.&lt;/p&gt;

&lt;p&gt;Nowadays, thanks to digital technologies, electronic signatures can carry similar legal effects when it comes to signing various agreements. Besides, with electronic signatures, businesses can complete the document authorization within a day without the need to print it, sign, scan, and send it back.&lt;/p&gt;

&lt;h2&gt;
  
  
  The definition of an electronic signature
&lt;/h2&gt;

&lt;p&gt;Marks on electronic documentation that have an intention to serve as a person's document authorization are determined as electronic signatures. The latter can be done by selecting a checkbox, through a keystroke or a simple stylus swipe.&lt;/p&gt;

&lt;p&gt;You are giving an electronic signature when you, signing up for Netflix and creating an account with them, check several boxes related to their policies. Your name at the end of every email you send is also considered an electronic signature.&lt;/p&gt;

&lt;p&gt;An electronic signature can have a number of different forms, including:&lt;/p&gt;

&lt;p&gt;Entering pin code when you withdraw money from an ATM&lt;br&gt;
Sending a scanned document with your wet signature&lt;br&gt;
Typing your first and last name in an electronic contract&lt;/p&gt;

&lt;p&gt;A lot of people also recreate their handwritten signature with the help of their smartphones to have it in an electronic format and reuse for various purposes.&lt;/p&gt;

&lt;p&gt;Electronic signing is easy to implement and it eliminates a lot of hassle around piles of paper. However, due to security reasons, electronic type of signature is defined as low trust because it doesn’t carry any proof of the identity of the signer and doesn’t track the possible changes that can occur after the document was already signed.&lt;/p&gt;

&lt;p&gt;To secure documents that are signed electronically, &lt;a href="http://smallpdf.com/sign-pdf"&gt;digital signatures&lt;/a&gt; like SmallPDF were introduced. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bqQNAgKI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zr8gkt1zbo5fsnx4buy1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bqQNAgKI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zr8gkt1zbo5fsnx4buy1.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The definition of a digital signature
&lt;/h2&gt;

&lt;p&gt;One of the most reliable methods for executing electronic agreement authorization is through digital signatures. The latter includes an authority certificate to validate the signatory and ensure the sent document was not changed after it was signed.&lt;/p&gt;

&lt;p&gt;Besides, all electronic communication is also signed with a private decryption key of the sender and can be verified by those who have access to the public key of the sender. Such a system ensures that two parties are exactly who they say they are, and all the exchanged content between them has not been edited.&lt;/p&gt;

&lt;p&gt;A digital signature example is when you select a platform for eSignature to sign and share your document. Once you are done with editing, the platform offers to leave a digital signature to secure it and eliminate the possibility of someone unauthorized viewing it.&lt;/p&gt;

&lt;p&gt;A digital signature serves as your unique fingerprint. While electronic signatures confirm your agreement with the T&amp;amp;Cs of a particular contract, a digital signature verifies its authenticity. The process of signatory and originator identification is the main difference between the two signatures.&lt;/p&gt;

&lt;h2&gt;
  
  
  Advantages and Disadvantages of Wet Signatures
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WpJqv8_C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8yrm4z8fa1vyv6bby4nw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WpJqv8_C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8yrm4z8fa1vyv6bby4nw.png" alt="pasted image 0 (3)"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Although both signatures, digital and electronic, are legally accepted across the world, there are many situations when you will be asked to sign a contract with a wet signature.&lt;/p&gt;

&lt;p&gt;A signature serves as an approval between several parties involved. Hence, one of the advantages of working with a wet signature is that all participants should be present in order to get everything signed. People can discuss the terms of the agreement, confirm all the details, and ensure that each party agrees with everything before signing.&lt;/p&gt;

&lt;p&gt;Despite this, there exist several reasons electronic signatures prevail when it comes to the process of signing different types of agreements.&lt;/p&gt;

&lt;p&gt;First, the amount of effort required to get a document signed using a wet signature is tremendous. It might seem okay, but on a bigger scale, when a company needs to sign a number of documents with different clients, the process can be seriously delayed.&lt;/p&gt;

&lt;p&gt;Second, printed documents can be damaged, stolen, or just lost, either outside of the office or in a pile of other papers. That does not happen with electronic documentation which requires no printing or scanning and can be safely saved on the cloud.&lt;/p&gt;

&lt;p&gt;Third, paper documents take a lot of space for storage, tons of effort to manage, and a lot of people’s resources to fill them. When you need to prepare a contract within no time, electronic documents will be lifesavers. Besides, it’s far easier then to find the needed file on the laptop rather than go looking for it among thousands of stacks of printed files.&lt;/p&gt;

&lt;h2&gt;
  
  
  Advantages of Digital Signatures
&lt;/h2&gt;

&lt;p&gt;Shifting to digital signing might be overwhelming at first, but is definitely worth the effort.&lt;/p&gt;

&lt;p&gt;There exist quite a lot of solutions on the market that provide companies with a ready-made system where they can store and easily manage all the electronic documentation and sign them securely and with no effort.&lt;/p&gt;

&lt;p&gt;Contracts can be created with customized digital signatures which will ensure absolute confidentiality and security of the signed documents. You can also create your own lists of those people who need to sign an agreement and track the entire process without moving from the laptop.&lt;/p&gt;

&lt;p&gt;Digital signatures save you time and eliminate most of the routine work when it comes to creating and signing contracts. With digital signatures, it is easy to verify the identity of the signer, obtain a legal signature, and store the received documents with no hassle and additional costs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrap Up
&lt;/h2&gt;

&lt;p&gt;The rise of digitalization and process automation has changed the way of collecting signatures. From using ink to sign papers to shifting to name seals, from utilizing faxes to moving to electronic means of authorization, people are looking for means to conduct things quicker than they used to. In a fast-paced environment like ours, the less time spent on the process, the better.&lt;/p&gt;

&lt;p&gt;Although wet signatures are still used in a number of cultures, many companies, service providers, and mobile apps have moved to electronic means of signing documents. The latter is fast and efficient and eliminates the need to process and store piles of paper.&lt;/p&gt;

&lt;p&gt;For people who value privacy and security, digital signatures are a way to make sure the agreement is signed by the right person, is safely transmitted, and undergoes no change after being signed. Besides, with a vast amount of digital platforms offering customized and safe tools for signing documents, it has become even easier to make a shift from traditional wet signatures to a new world of digitalization.&lt;/p&gt;

</description>
      <category>sideprojects</category>
      <category>digitalsignature</category>
      <category>devjournal</category>
    </item>
    <item>
      <title>10 Tips for Safe and Secure Remote Work for Developers</title>
      <dc:creator>Andriy Zapisotskyi</dc:creator>
      <pubDate>Thu, 01 Jul 2021 17:10:15 +0000</pubDate>
      <link>https://forem.com/azapisotskyi/10-tips-for-safe-and-secure-remote-working-for-developers-19fg</link>
      <guid>https://forem.com/azapisotskyi/10-tips-for-safe-and-secure-remote-working-for-developers-19fg</guid>
      <description>&lt;h1&gt;
  
  
  10 Tips for Safe and Secure Remote Working
&lt;/h1&gt;

&lt;p&gt;Modern employees require more flexibility than their previous counterparts. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.studocu.com/row/document/kenyatta-university/communication-skills/essays/the-way-we-work-has-changed/11470168/view" rel="noopener noreferrer"&gt;54%&lt;/a&gt; of employees say they’d rather shift to a career that offers them more flexibility. In other words, organizations are more likely to retain employees if they offer flexible work arrangements.&lt;/p&gt;

&lt;p&gt;But shifting from in-person work to remote work comes with a full host of changes (and something to keep in mind when &lt;a href="https://www.davidsongray.co.uk/how-much-does-a-recruitment-business-set-up-cost/" rel="noopener noreferrer"&gt;starting a business&lt;/a&gt;). The most crucial one? Making sure your remote team is set up to work safely and securely. &lt;/p&gt;

&lt;p&gt;But before we touch on 10 tips to improve your &lt;a href="https://biz30.timedoctor.com/cybersecurity-for-remote-workers/" rel="noopener noreferrer"&gt;remote team’s security&lt;/a&gt;, let’s take a look at the importance of &lt;a href="https://scalefusion.com/mobile-device-management" rel="noopener noreferrer"&gt;safe and secure remote working&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  The importance of safe and secure remote working
&lt;/h3&gt;

&lt;p&gt;Now that more employees are &lt;a href="https://www.peoplehum.com/blog/creating-an-effective-remote-work-space" rel="noopener noreferrer"&gt;working remotely&lt;/a&gt;, many companies are using &lt;a href="https://www.frevvo.com/cloud-workflow-software" rel="noopener noreferrer"&gt;cloud based workflows&lt;/a&gt;, &lt;a href="https://getvoip.com/blog/2020/07/02/what-is-cpaas/" rel="noopener noreferrer"&gt;cloud communication platforms&lt;/a&gt; or other &lt;a href="https://www.g2.com/categories/cloud-management-platforms" rel="noopener noreferrer"&gt;cloud management solutions&lt;/a&gt;, and &lt;a href="https://niftypm.com/blog/the-top-30-office-management-software-tools/" rel="noopener noreferrer"&gt;office management software&lt;/a&gt;, so everyone has access to real-time information and documents. That way, the process of &lt;a href="https://www.timecamp.com/blog/2021/05/top-10-time-tracking-software-for-programmers/" rel="noopener noreferrer"&gt;tracking developer productivity&lt;/a&gt; get also simplified. With employees being able to access company information from anywhere in the world, data security is more important than ever.&lt;/p&gt;

&lt;p&gt;But the average remote employee may not have the set-up that businesses require to protect sensitive and proprietary information.&lt;/p&gt;

&lt;p&gt;Without business-grade security, &lt;a href="https://www.solitairebliss.com/blog/how-we-improved-our-email-open-rate" rel="noopener noreferrer"&gt;businesses&lt;/a&gt; are leaving themselves open to compliance issues, brand damage, leaked data, financial loss, and other legal and costly risks.&lt;/p&gt;

&lt;p&gt;That’s why it’s crucial to be proactive about protecting your business’s security. &lt;/p&gt;

&lt;p&gt;To protect your business, check out the following 10 safety tips.&lt;/p&gt;

&lt;h2&gt;
  
  
  10 Tips for Safe and Secure Remote Working for Developers
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1: Use a VPN
&lt;/h3&gt;

&lt;p&gt;Our first tip for increasing home and remote network security is providing &lt;a href="https://devsquad.com/" rel="noopener noreferrer"&gt;development teams&lt;/a&gt; with access to a virtual private network (VPN).&lt;/p&gt;

&lt;p&gt;VPNs act like a highly protected tunnel within another network connection you manage. All data stays within the tunnel, meaning: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No one outside the &lt;a href="https://www.namecheap.com/vpn/what-is-a-vpn/" rel="noopener noreferrer"&gt;VPN&lt;/a&gt; has the authority to access it&lt;/li&gt;
&lt;li&gt;Your data never mingles with or leaks out into the internet&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;VPNs also unlock geographically restricted internet pages without encrypting your traffic (so it doesn’t affect your internet speed). Finally, you'll have a chance to check your favorite sites or other &lt;a href="https://gathercontent.com/" rel="noopener noreferrer"&gt;quality content&lt;/a&gt; materials worldwide.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpwizoogi2s286douveb5.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpwizoogi2s286douveb5.jpeg" alt="VPN"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When choosing a VPN, look for one that offers 24/7 &lt;a href="https://www.cloudtalk.io/virtual-call-center-software" rel="noopener noreferrer"&gt;customer support&lt;/a&gt;, native apps for multiple operating systems and devices, and international servers, like &lt;a href="https://vpnguru.com/reviews/expressvpn/" rel="noopener noreferrer"&gt;ExpressVPN&lt;/a&gt; does.&lt;/p&gt;

&lt;h3&gt;
  
  
  2: Keep HR processes and data confidential
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.crazyegg.com/blog/best-peo-companies/" rel="noopener noreferrer"&gt;HR processes&lt;/a&gt; and data contain sensitive information that could lead to business and legal problems if compromised. &lt;/p&gt;

&lt;p&gt;Because of this, HR teams need a way to access important data to do their jobs without sacrificing security. The answer? &lt;/p&gt;

&lt;p&gt;Storing data securely and making it accessible to the right people.&lt;/p&gt;

&lt;p&gt;To do this, you’ll either need to use a tool like Microsoft’s Compliance Manager in Microsoft 365 or you can hire a professional employer organization (PEO) service provider to handle it for you.&lt;/p&gt;

&lt;h3&gt;
  
  
  3: Have a safe contract signing process
&lt;/h3&gt;

&lt;p&gt;Remote working means that you’ll likely hire your team (developers, product managers, &lt;a href="https://www.twine.net/find/web-designers" rel="noopener noreferrer"&gt;web designers&lt;/a&gt; etc.) without seeing them face-to-face. &lt;/p&gt;

&lt;p&gt;From non-disclosure agreements to work contracts and W-4s, new employees have a lot of forms to sign.&lt;/p&gt;

&lt;p&gt;To make sure your onboarding process is secure, you’ll need to use &lt;a href="https://www.pandadoc.com/contract-management-software/" rel="noopener noreferrer"&gt;contract management software&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;This ensures that all documents are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In order&lt;/li&gt;
&lt;li&gt;Signed and dated electronically &lt;/li&gt;
&lt;li&gt;Encrypted and secured from lurkers &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Having a safe contract signing process is also important for other contracts and forms, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Client contracts&lt;/li&gt;
&lt;li&gt;Vendor contracts&lt;/li&gt;
&lt;li&gt;Tax forms &lt;/li&gt;
&lt;li&gt;Legal forms&lt;/li&gt;
&lt;li&gt;Banking forms &lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.skubana.com/blog/inventory-reports" rel="noopener noreferrer"&gt;Inventory reports&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4: Share documents securely
&lt;/h3&gt;

&lt;p&gt;Collaboration and file sharing are integral parts of a remote business.&lt;/p&gt;

&lt;p&gt;Whether it’s NDA, copy templates, product description, or ad copy – all documents have to be shared securely across the whole team.&lt;/p&gt;

&lt;p&gt;Using &lt;a href="https://thedigitalprojectmanager.com/best-collaboration-tools/" rel="noopener noreferrer"&gt;premium collaboration tools&lt;/a&gt; is a more secure way to share files because of the tools' advanced built-in security features.&lt;/p&gt;

&lt;p&gt;To help your employees securely share files, consider using protected &lt;a href="https://wordable.io/open-a-pdf-in-google-docs/" rel="noopener noreferrer"&gt;PDFs and private Google docs&lt;/a&gt; with assigned permissions. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdrhg8yfs00uhm2vt1znx.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdrhg8yfs00uhm2vt1znx.jpeg" alt="Lumin PDF"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Make sure to encourage your employees to refrain from collaborating and sharing files through email. Although sharing through email is usually quick and easy, it’s best to avoid &lt;a href="https://dev.to/baldikov/how-to-secure-the-communication-of-your-remote-team-3g0"&gt;communicating&lt;/a&gt; and transferring files this way if confidential information is involved.&lt;/p&gt;

&lt;p&gt;If you &lt;a href="https://respona.com/blog/email-outreach/" rel="noopener noreferrer"&gt;have to use email&lt;/a&gt; to send or receive a file, always triple-check where it’s coming from or where you’re sending it to make sure it’s a valid and secure email address.&lt;/p&gt;

&lt;p&gt;Also, if you want to bring your advertising metrics into Google Workspace, you can increase productivity by using a &lt;a href="https://cleverads.com/addon-google-sheets/" rel="noopener noreferrer"&gt;Google spreadsheet add-on&lt;/a&gt; or even try &lt;a href="https://www.themetablog.io/gdocs-to-wordpress-markup-cleaner/" rel="noopener noreferrer"&gt;GDocs to WordPress markup cleaner&lt;/a&gt;. Make sure it is a Premier Google Partner, since this guarantees you that this process is 100% secure.&lt;/p&gt;

&lt;h3&gt;
  
  
  5: Issue devices to your team
&lt;/h3&gt;

&lt;p&gt;When employees use their own devices to work from home, they tend to use devices that are less secure than business-issued devices. &lt;/p&gt;

&lt;p&gt;It’s possible that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Their devices don’t have proper security applications installed&lt;/li&gt;
&lt;li&gt;They don’t update their software&lt;/li&gt;
&lt;li&gt;They could be using the same simple password for all logins&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even worse, they could be accessing insecure websites like torrents or suspicious sites using those same devices. This increases the risk of data leaks and viruses plaguing your confidential files. &lt;/p&gt;

&lt;p&gt;To avoid this, consider issuing professional devices to your employees that your IT team recommends. If this isn’t possible, see if your IT team can tighten the security around your employees’ personal devices. &lt;/p&gt;

&lt;h3&gt;
  
  
  6: Use antivirus software
&lt;/h3&gt;

&lt;p&gt;Your business probably already uses cybersecurity tools to protect against &lt;a href="https://dev.to/pranav2612000/phishinder-a-phishing-detection-tool-3ff0"&gt;phishing&lt;/a&gt;, viruses, malware, and ransomware on business hardware. &lt;/p&gt;

&lt;p&gt;But if employees are using personal devices for work, they need high-level protection too. &lt;/p&gt;

&lt;p&gt;To make sure they use antivirus software, provide them with security software programs and ask them to show you proof that they’ve been installed. You can also provide a list of acceptable security software programs as an alternative. &lt;/p&gt;

&lt;p&gt;In the end, there’s no way around it — everyone needs antivirus software to work safely. &lt;/p&gt;

&lt;h3&gt;
  
  
  7: Implement remote working policies
&lt;/h3&gt;

&lt;p&gt;Implementing &lt;a href="https://www.growthmentor.com/blog/remote-work-can-transform-startup/" rel="noopener noreferrer"&gt;remote work&lt;/a&gt; security policies shows your team that your business is serious about having security measures in place. This also holds your staff accountable for working securely.&lt;/p&gt;

&lt;p&gt;After choosing which policies to implement, be a &lt;a href="http://lead.app/" rel="noopener noreferrer"&gt;virtual mentor&lt;/a&gt; and make sure to coach your team, so they fully understand what’s expected of them.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff54e2tfvuaucl90061bp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff54e2tfvuaucl90061bp.png" alt="Policy"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Your security policies may include rules about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Screen positioning &lt;/li&gt;
&lt;li&gt;Session logout&lt;/li&gt;
&lt;li&gt;Sharing access&lt;/li&gt;
&lt;li&gt;Alternative work sites &lt;/li&gt;
&lt;li&gt;Lockable, burglar-resistant office equipment &lt;/li&gt;
&lt;li&gt;Backup media storage&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://memory.ai/timely-blog/time-management-techniques" rel="noopener noreferrer"&gt;Time management&lt;/a&gt; through various tools&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Whether it's a software project or remote policy – make sure to have a proper &lt;a href="https://www.teamwork.com/templates/software-implementation-plan/" rel="noopener noreferrer"&gt;implementation plan&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  8: Encourage employees to report suspicious attempts
&lt;/h3&gt;

&lt;p&gt;Employees often feel nervous reporting suspicious attempts or potential cyber incidents. They may fear losing their job, getting penalized, or being questioned about breaching security policies. &lt;/p&gt;

&lt;p&gt;But encouraging employees to report cyber incidents can make them feel more comfortable about coming forward when something happens. &lt;/p&gt;

&lt;p&gt;To foster open communication, create a single source dedicated to reporting suspicious activity via a dedicated messaging group, Slack channel, or &lt;a href="https://blog.viibe.co/remote-help-desk-it-support/" rel="noopener noreferrer"&gt;IT support&lt;/a&gt; email. This way, they’ll know exactly how to report the incident when they’re working from home or &lt;a href="https://drop-desk.com/best-coworking-spaces/new-york-city" rel="noopener noreferrer"&gt;coworking space&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;It’s also important to ask employees to report suspicious activity, even if they broke one of your security policies. To encourage them to do this, ensure employees that they won’t face harsh disciplinary action if they come forward. Then, offer additional security training so they can be better equipped to follow policies in the future. &lt;/p&gt;

&lt;h3&gt;
  
  
  9: Provide security training and reminders to your team
&lt;/h3&gt;

&lt;p&gt;Conducting security training in the form of &lt;a href="https://moosend.com/blog/webinar-marketing/" rel="noopener noreferrer"&gt;webinars&lt;/a&gt;, workshops, and video classes helps employees better understand how to work safely. For this, there are tons of useful &lt;a href="https://clipchamp.com/en/video-editor/" rel="noopener noreferrer"&gt;online video editors&lt;/a&gt;, &lt;a href="https://www.webinarsoftware.org/best-webinar-software/" rel="noopener noreferrer"&gt;webinar platforms&lt;/a&gt; or &lt;a href="https://www.alexbirkett.com/best-online-course-platforms/" rel="noopener noreferrer"&gt;course platforms&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Facs1imw7e94n6kgfvbih.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Facs1imw7e94n6kgfvbih.png" alt="Remote work security"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When deciding on a training program, choose one that’s hands-on. This way, employees can practice sharing files, updating software, configuring their routers, installing virus protection, and using VPNs. &lt;/p&gt;

&lt;p&gt;One more important point, use LastPass as a password management system or any other &lt;a href="https://blog.appsumo.com/lastpass-alternative/" rel="noopener noreferrer"&gt;LastPass alternative&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It’s also important to explain exactly what to do if something goes awry. &lt;/p&gt;

&lt;h3&gt;
  
  
  10: Prepare for a security breach
&lt;/h3&gt;

&lt;p&gt;Remember, security is a team effort. It’s not really a question of if you’ll have a security breach, but rather when you’ll have one.&lt;/p&gt;

&lt;p&gt;To make sure your business will still be up and running when that happens, have backup systems in place. &lt;/p&gt;

&lt;p&gt;What will you do if an employee’s device is stolen?&lt;/p&gt;

&lt;p&gt;What will you do if a manager accidentally opens a phishing email?&lt;/p&gt;

&lt;p&gt;Have a backup plan in place in case anything happens. That way, you won’t lose productivity, even if your systems and networks are breached. &lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;And that’s it! We hope these 10 tips for safe and secure remote working are just what you needed to read. &lt;/p&gt;

&lt;p&gt;With careful planning and training, your team will be on its way to operating as securely as possible.&lt;/p&gt;

&lt;p&gt;Are you curious about the history of cloud-based workflows, AKA the main reason businesses can operate and collaborate remotely? &lt;a href="http://devpods.herokuapp.com/podcasts/devdiscuss/episodes/172" rel="noopener noreferrer"&gt;Then check out our podcast episode “The History of the Cloud.”&lt;/a&gt;&lt;/p&gt;

</description>
      <category>remote</category>
      <category>workstations</category>
      <category>programming</category>
      <category>security</category>
    </item>
    <item>
      <title>Sending Emails with JavaScript</title>
      <dc:creator>Andriy Zapisotskyi</dc:creator>
      <pubDate>Tue, 16 Jun 2020 11:28:58 +0000</pubDate>
      <link>https://forem.com/mailtrap/sending-emails-with-javascript-4jdl</link>
      <guid>https://forem.com/mailtrap/sending-emails-with-javascript-4jdl</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;The guide about &lt;a href="https://blog.mailtrap.io/javascript-send-email/"&gt;Sending emails with Javascript&lt;/a&gt; first appeared on Mailtrap blog.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;JavaScript is a programming language that you can use for both front-end and back-end development. When the name JavaScript is used in the context of sending emails, Node.js is the first thing that comes to mind. We even blogged about how to send emails with Node.js. In this article, we want to change the perspective from the server-side to the client-side. Let’s figure out how you can use JS to send emails from the app that has no back-end.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ: Can I send emails with JS or not?
&lt;/h2&gt;

&lt;p&gt;You can’t send emails using JavaScript code alone due to lack of support for server sockets. For this, you need a server-side language that talks to the SMTP server. You can use JS in conjunction with a server script that will send emails from the browser based on your requests. This is the value we’re going to introduce below.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why you might want to send emails with JS
&lt;/h2&gt;

&lt;p&gt;Traditionally, the server-side of a regular app is responsible for sending emails. You will need to set up a server using back-end technology. The client-side sends a request to the server-side, which creates an email and sends it to the SMTP server. If you’re curious about what happens with an email after that, read our blog post, &lt;a href="https://blog.mailtrap.io/smtp-relay/"&gt;SMTP relay&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;So, why would anyone be willing to go another way and send emails right from the client-side using JavaScript? Such an approach is quite useful for building contact forms or other kinds of user interaction on web apps, which allows your app to send an email without refreshing the page the user is interacting with. Besides, you don’t have to mess around with coding a server. This is a strong argument if your web app uses email sending for contact forms only. Below, you will find a few options on how to make your app send emails from the client-side. &lt;/p&gt;

&lt;h2&gt;
  
  
  mailto: for sending form data
&lt;/h2&gt;

&lt;p&gt;Since you can't send an email directly with JS, you can tell the browser to open a default mail client to do so. Technically, the &lt;code&gt;mailto:&lt;/code&gt;` method does not send email directly from the browser, but it can do the job. Check out how the following code example works:&lt;/p&gt;

&lt;p&gt;FirstName:&lt;br&gt;
Email:&lt;/p&gt;

&lt;p&gt;When you launch it in the browser, you’ll see the following:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rjltU_r6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ucarecdn.com/4e7c444f-5ac2-44e7-b8eb-a8d288c4db02/" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rjltU_r6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ucarecdn.com/4e7c444f-5ac2-44e7-b8eb-a8d288c4db02/" alt="Screen Shot 2020-06-16 at 1.45.34 PM.png" width="880" height="137"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the data has been submitted, the browser opens a default mail client. In our case, this is Gmail.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wB6e5xlj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ucarecdn.com/51cbde64-634e-4649-bea4-7c3b3adf0e36/" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wB6e5xlj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ucarecdn.com/51cbde64-634e-4649-bea4-7c3b3adf0e36/" alt="Screen Shot 2020-06-16 at 1.45.46 PM.png" width="880" height="296"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;&lt;/code&gt;&lt;code&gt;mailto:&lt;/code&gt;&lt;code&gt;&lt;/code&gt; method is a rather easy solution to implement but it has some specific drawbacks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can’t control the layout of the data since the data is submitted in the form sent by the browser.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&lt;/code&gt;&lt;code&gt;mailto:&lt;/code&gt;&lt;code&gt;&lt;/code&gt; doesn’t protect your email address from being harvested by spambots. Some time ago, this could be mitigated by constructing a link in JS. These days, more and more bots run JS and do not rely on HTML rendered by the server alone.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  SmtpJS.com - true email sending from JavaScript
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.smtpjs.com/"&gt;SmtpJS&lt;/a&gt; is a free library you can use for sending emails from JavaScript. All you need is an SMTP server and a few manipulations to get things done. We’ll use &lt;a href="https://mailtrap.io/"&gt;Mailtrap.io&lt;/a&gt; as the server because it is an actionable solution for email testing. Below is the flow you should follow:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Create an HTML file (for example, test.html) with the following script:&lt;/p&gt;

 &lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a button that will trigger the JavaScript function&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Write the JS function to send emails via SmtpJS.com.&lt;br&gt;
function sendEmail() {&lt;br&gt;
Email.send({&lt;br&gt;
Host : "smtp.mailtrap.io",&lt;br&gt;
Username : "",&lt;br&gt;
Password : "",&lt;br&gt;
To : '&lt;a href="mailto:recipient@example.com"&gt;recipient@example.com&lt;/a&gt;',&lt;br&gt;
From : "&lt;a href="mailto:sender@example.com"&gt;sender@example.com&lt;/a&gt;",&lt;br&gt;
Subject : "Test email",&lt;br&gt;
Body:&lt;br&gt;
}).then(&lt;br&gt;
message =&amp;gt; alert(message)&lt;br&gt;
);&lt;br&gt;
}&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run test.html in the browser and send your email&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Xr1WUb_7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ucarecdn.com/fe45111d-088a-4773-bb01-d0869df0f888/" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Xr1WUb_7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ucarecdn.com/fe45111d-088a-4773-bb01-d0869df0f888/" alt="Screen Shot 2020-06-16 at 1.53.51 PM.png" width="880" height="161"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The drawback with the code sample above is that your username and password are visible in the client-side script. This can be fixed if you utilize the encryption option provided by SmtpJS. Click the Encrypt your SMTP credentials button and fill in the required fields. &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dtASO7_9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ucarecdn.com/ed2a5e52-cd59-44d1-879c-b4621174b76a/" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dtASO7_9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ucarecdn.com/ed2a5e52-cd59-44d1-879c-b4621174b76a/" alt="Screen Shot 2020-06-16 at 1.54.00 PM.png" width="722" height="760"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After that, press Generate security token and use it then in your JS function instead of SMTP server settings like the following:&lt;br&gt;
&lt;code&gt;&lt;/code&gt;&lt;code&gt;SecureToken : "&amp;lt;your generated token&amp;gt;"&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Want to more code samples for an HTML email and an email with attachments? Check the full article at &lt;a href="https://blog.mailtrap.io/javascript-send-email/"&gt;Mailtrap blog&lt;/a&gt;.
&lt;/h2&gt;

</description>
      <category>javascript</category>
      <category>email</category>
      <category>java</category>
    </item>
    <item>
      <title>Sending emails with Node.js</title>
      <dc:creator>Andriy Zapisotskyi</dc:creator>
      <pubDate>Mon, 15 Jun 2020 11:20:54 +0000</pubDate>
      <link>https://forem.com/mailtrap/node-js-emails-5g3m</link>
      <guid>https://forem.com/mailtrap/node-js-emails-5g3m</guid>
      <description>&lt;p&gt;Sending emails from Node.js is easy. We have gone over it in our previous blog post on &lt;a href="https://blog.mailtrap.io/sending-emails-with-nodemailer/"&gt;sending emails with Nodemailer&lt;/a&gt;. Last time we reviewed Nodemailer’s capabilities we focused on sending HTML emails via SMTP. In this post, we will examine how to send emails with Node.js using popular email servers like Gmail. Also, we will have a look at other transport options and packages to build and send emails from Node.js.  &lt;/p&gt;

&lt;p&gt;The "&lt;a href="https://blog.mailtrap.io/send-emails-with-nodejs/"&gt;Send emails in Node.js&lt;/a&gt;" blog post originally was published on Mailtrap's blog.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building and sending emails with Node.js without Nodemailer
&lt;/h2&gt;

&lt;p&gt;In some guides and tutorials, you might find a note that there are a variety of Node.js email packages but Nodemailer is the best one. It’s not true. In fact, you can barely find a decent alternative to Nodemailer (and I can hardly imagine why you might need it.)&lt;/p&gt;

&lt;p&gt;On Github, you can find several Node.js packages related to emails but they won’t offer you a wide functionality. With Nodemailer, you can create HTML emails with attachments and send them via SMTP, SES (wrapper for sending emails via AWS SES), or &lt;em&gt;sendmail&lt;/em&gt;. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The most similar package is &lt;a href="https://github.com/eleith/emailjs"&gt;Emaijs&lt;/a&gt;. Its features include: &lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;sending emails via SMTP servers (both SSL and TLS) with authentication&lt;/li&gt;
&lt;li&gt;HTML support and MIME attachments (also, attachments can be added as strings, streams, or file paths)&lt;/li&gt;
&lt;li&gt;asynchronous sending of queued emails &lt;/li&gt;
&lt;li&gt;UTF-8 encoding in headers and body.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So, the main difference is that in Emailjs you will use MIME type to work with attachments, while in Nodemailer you use strings. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Another quite popular package is &lt;a href="https://github.com/niftylettuce/email-templates"&gt;email-templates&lt;/a&gt;. As you can see from the name, this package is designed for creating various custom templates for Node.js. It features support for automatic inline CSS, stylesheets, embedded images, and fonts. Also, it has an email preview option. The email templates package was made by the creator of the &lt;a href="https://lad.js.org/"&gt;Lad&lt;/a&gt; framework. So it’s recommended to use it with Lad. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;One more package worth mentioning here is &lt;a href="https://github.com/eladnava/mailgen"&gt;Mailgen&lt;/a&gt;. It is aimed at creating HTML templates for transactional emails. There is a note on Github, that with Mailgen you can “Programmatically create beautiful e-mails using plain old JavaScript.” The package includes several open-source themes as well as supports custom elements like tables, action buttons, etc. It is your choice how to send an email created with Mailgen, but they recommend checking out Nodemailer for this purpose. &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;| &lt;strong&gt;Feature&lt;/strong&gt; | &lt;strong&gt;Nodemailer&lt;/strong&gt; | &lt;strong&gt;Emailjs&lt;/strong&gt; | &lt;strong&gt;Email templates&lt;/strong&gt; | &lt;strong&gt;Mailgen&lt;/strong&gt; |&lt;br&gt;
| Building HTML emails | yes | Yes +MIME | Yes + CSS and customization | yes+CSS+themes |&lt;br&gt;
| Email sending | SMTP, SES, &lt;em&gt;sendmail&lt;/em&gt; | SMTP | Lad | no |&lt;br&gt;
| Github rating (stars) (as on June 25, 2019) | 11,258 | 1,748 | 2,489 | 2,223 |&lt;br&gt;
| Last commit (as on June 25, 2019) | May 26, 2019 | Sept 4, 2018 | June 23, 2019 | Jan 3, 2019 |&lt;/p&gt;

&lt;p&gt;As you can see from the above table, Nodemailer is the most popular package, which offers functionality for both email creation and email sending. It’s not limited to one sending method. But it won’t be easy to create a special email template. This is why it might be a good idea to use Nodemailer in combination with another package.&lt;/p&gt;

&lt;p&gt;To find all related packages and plugins, &lt;a href="https://www.npmjs.com/search?q=nodemailer"&gt;search for nodemailer&lt;/a&gt; in npm.&lt;/p&gt;
&lt;h2&gt;
  
  
  Sending HTML emails with dynamic content
&lt;/h2&gt;

&lt;p&gt;In our previous blog post, we reviewed &lt;a href="https://blog.mailtrap.io/sending-emails-with-nodemailer/"&gt;several examples of sending HTML emails&lt;/a&gt; with Nodemailer, embedding images, and attaching files. In most cases, for transactional emails like registration confirmation or resetting passwords, you need to use dynamic content. It will be easier and more efficient to do it with one of the template modules. &lt;/p&gt;

&lt;p&gt;Let’s experiment with the &lt;a href="https://www.npmjs.com/package/email-templates"&gt;email-templates&lt;/a&gt; package. It has several interesting features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Support for different template engines (&lt;a href="https://pugjs.org/api/getting-started.html"&gt;Pug&lt;/a&gt; is a default one)&lt;/li&gt;
&lt;li&gt;Email preview (by default) in the development environment&lt;/li&gt;
&lt;li&gt;Direct email sending. So, you don’t need extra packages like Nodemailer for email sending. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;First of all, let’s create our templates, for a frequently occurring scenario: new user registration. In this example, we are working with the default option (for more details and samples of using Pug, refer to &lt;a href="https://github.com/pugjs/pug"&gt;Github&lt;/a&gt;.) &lt;/p&gt;

&lt;p&gt;Install the template engine:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.npmjs.com/"&gt;npm&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install email-templates pug
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://yarnpkg.com/"&gt;yarn&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yarn add email-templates pug
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We should create two files: subject and HTML body.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;subject.pug:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;= `Hi ${firstName} ${lastName}, happy to see you at My App!`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;html.pug:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;h1 Hello #{firstName} #{lastName}
    p.
Welcome to My App! Now your test emails will be safe. We just need to make sure your account is real. 
Please, click the button below and start using your account. 
a(href='https://example.com/confirmation') Confirm!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now make sure that your directory has the following structure:&lt;/p&gt;

&lt;p&gt;├── app.js&lt;/p&gt;

&lt;p&gt;├── emails&lt;/p&gt;

&lt;p&gt;│   └── welcome (the template name)&lt;/p&gt;

&lt;p&gt;│       ├── html.pug&lt;/p&gt;

&lt;p&gt;│       ├── subject.pug&lt;/p&gt;

&lt;p&gt;│       └── text.pug&lt;/p&gt;

&lt;p&gt;Pay attention to the text part of your message: if you don’t include it, it will be generated automatically. But if you add it, it will be rendered automatically. This means that the content of the text and HTML parts may differ. &lt;/p&gt;

&lt;p&gt;Now we can write some code to gather all the elements together and add transport. As usual, we will use &lt;a href="https://mailtrap.io/"&gt;Mailtrap&lt;/a&gt;, to be able to test and check everything. In the same way, you can use any other SMTP server like Gmail, for example. Just be careful if experimenting with real email addresses!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const Email = require('email-templates');
const email = new Email({
 message: {
   from: 'hi@example.com'
 },
 send: true,
 transport: {
   host: 'smtp.mailtrap.io',
   port: 2525,
   ssl: false,
   tls: true,
   auth: {
     user: '1a2b3c4d5e6f7g', // your Mailtrap username
     pass: '1a2b3c4d5e6f7g' //your Mailtrap password
   }
 }
});

const people = [
 {firstName: 'Diana', lastName: 'One'},
 {firstName: 'Alex', lastName: 'Another'}
];

people.forEach((person) =&amp;gt; {
 email
   .send({
     template: 'welcome',
     message: {
       to: 'test@example.com'
     },
     locals: person
   })
   .then(console.log)
   .catch(console.error);
}).
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By default, the preview of your email will be opened in your browser. It might be helpful if you are working on your template and don’t need to actually send the message. If you need to test how the variables work, and you compose a message to dozens or even hundreds of recipients, be careful with this option. To switch it off, specify &lt;em&gt;options.open&lt;/em&gt; as &lt;em&gt;false.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This is why we use Mailtrap: we will see how the message looks for each recipient, explore both HTML and text versions, and will be able to perform additional checks. With Pug and email-templates, you can build a complex template using CSS, inlined images, tables, etc. Here is an example of how it should look in the Mailtrap virtual inbox:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--psi1O4Oj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh5.googleusercontent.com/TwdtkXu-XSEkbWE4ojpb2O2pBEXItu3oJtChPpaGvXnx9F3ZW4wCru1oTDe05yL4dUOWCdwWyw-eXzxQsfH3l58Rsna_07PXopB1ZCohOtKBsjqQDMCcGocd0ceO_AW2_s57STi1" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--psi1O4Oj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh5.googleusercontent.com/TwdtkXu-XSEkbWE4ojpb2O2pBEXItu3oJtChPpaGvXnx9F3ZW4wCru1oTDe05yL4dUOWCdwWyw-eXzxQsfH3l58Rsna_07PXopB1ZCohOtKBsjqQDMCcGocd0ceO_AW2_s57STi1" alt="" width="880" height="400"&gt;&lt;/a&gt;* HTML*&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JEFR9ISD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh3.googleusercontent.com/-pqsBEo-Mr4NVbcJQetksXWMSX2QhL-Cvy_pDqyf6CscXMTGxPK1s08HfW3WTulsHR5UO45ygUdA-XmePkso_dwiRhO3PHkGNB0Kk033vAr6shEDwK6wX0jBK7G63eLddvHu8VAg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JEFR9ISD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh3.googleusercontent.com/-pqsBEo-Mr4NVbcJQetksXWMSX2QhL-Cvy_pDqyf6CscXMTGxPK1s08HfW3WTulsHR5UO45ygUdA-XmePkso_dwiRhO3PHkGNB0Kk033vAr6shEDwK6wX0jBK7G63eLddvHu8VAg" alt="" width="880" height="399"&gt;&lt;/a&gt;* Text*&lt;/p&gt;

&lt;p&gt;Enjoyed the reading? Full guide in &lt;a href="https://blog.mailtrap.io/send-emails-with-nodejs/"&gt;Node.js and Emails&lt;/a&gt; is available at Mailtrap blog.&lt;/p&gt;

</description>
      <category>node</category>
      <category>javascript</category>
      <category>startup</category>
      <category>emails</category>
    </item>
    <item>
      <title>PHP built-in mail function vs PHP mailing packages</title>
      <dc:creator>Andriy Zapisotskyi</dc:creator>
      <pubDate>Wed, 01 Apr 2020 20:05:24 +0000</pubDate>
      <link>https://forem.com/mailtrap/php-built-in-mail-function-vs-php-mailing-packages-38nc</link>
      <guid>https://forem.com/mailtrap/php-built-in-mail-function-vs-php-mailing-packages-38nc</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;The article on &lt;a href="https://blog.mailtrap.io/php-email-sending/"&gt;Sending Emails in PHP&lt;/a&gt; was originally published at Mailtrap's blog.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  PHP built-in mail function ()
&lt;/h2&gt;

&lt;p&gt;There are two basic ways of sending emails with PHP: built-in mail function and external mail packages.  &lt;/p&gt;

&lt;p&gt;PHP’s built-in mail function () is very simple but at the same time, it provides a limited functionality for sending emails. You won’t be able to add attachments to your email, and building a beautiful HTML template with embedded images will be a tricky task as well. &lt;/p&gt;

&lt;p&gt;The other side of the PHP mail function () is that the email is sent from your web server, which may cause issues with deliverability due to security concerns such as suspicion of spam and blacklisting. The best way to overcome this problem is sending messages via an SMTP server, however, this functionality is limited as well. PHP mail() does not usually allow you to use the external SMTP server and it does not support SMTP authentication.&lt;/p&gt;

&lt;p&gt;In other words, I don’t recommend using the PHP built-in mail function() and advise you to avoid the headaches it may cause by installing an external mailer package.&lt;/p&gt;

&lt;p&gt;If you are still committed to the PHP built-in mail function() and are ready to accept the challenge, let’s take a look at the basic code and its main parameters. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax and parameters&lt;/strong&gt;&lt;br&gt;
The PHP mail syntax is pretty simple:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?php
mail($to_email_address,$subject,$message,[$headers],[$parameters]);
?&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It uses the following parameters: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“$to” = your message recipient(s). The email address format may be &lt;a href="mailto:user@example.com"&gt;user@example.com&lt;/a&gt; or User &lt;a href="mailto:user@example.com"&gt;user@example.com&lt;/a&gt;. If there are several recipients, separate them with comma(-s).
&lt;/li&gt;
&lt;li&gt;“$subject” = your message’s subject
“$message” = the body of your message. Lines should be separated with a CRLF (\r\n). Each line should not exceed 70 characters.&lt;/li&gt;
&lt;li&gt;“[$headers]” = additional recipients of your message, which can be included in CC or BCC.  Headers are optional, except for the “from” header: it must be specified, otherwise, you will receive an error message like Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For more details and additional parameters, refer to the &lt;a href="http://php.net/manual/en/function.mail.php"&gt;PHP documentation&lt;/a&gt;. &lt;/p&gt;

&lt;h2&gt;
  
  
  Sending HTML email using PHP mail() function
&lt;/h2&gt;

&lt;p&gt;The body of the message can be written in HTML. However, as I’ve mentioned above, it should be simple. In the PHP mail function(), the HTML part will look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Message
$message = '
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
  &amp;lt;title&amp;gt;Review Request Reminder&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
  &amp;lt;p&amp;gt;Here are the cases requiring your review in December:&amp;lt;/p&amp;gt;
  &amp;lt;table&amp;gt;
    &amp;lt;tr&amp;gt;
      &amp;lt;th&amp;gt;Case title&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Category&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Status&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Due date&amp;lt;/th&amp;gt;
    &amp;lt;/tr&amp;gt;
    &amp;lt;tr&amp;gt;
      &amp;lt;td&amp;gt;Case 1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Development&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;pending&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Dec-20&amp;lt;/td&amp;gt;
    &amp;lt;/tr&amp;gt;
    &amp;lt;tr&amp;gt;
      &amp;lt;td&amp;gt;Case 1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;DevOps&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;pending&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Dec-21&amp;lt;/td&amp;gt;
    &amp;lt;/tr&amp;gt;
  &amp;lt;/table&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It’s important to remember that to send HTML mail, you need to set the Content-type header...&lt;/p&gt;

&lt;blockquote&gt;
&lt;h2&gt;
  
  
  Continue reading the full guide on &lt;a href="https://blog.mailtrap.io/php-email-sending/"&gt;sending emails in PHP&lt;/a&gt; originally on Mailtrap blog.
&lt;/h2&gt;
&lt;/blockquote&gt;

</description>
      <category>php</category>
      <category>email</category>
    </item>
    <item>
      <title>Mails and Node JS</title>
      <dc:creator>Andriy Zapisotskyi</dc:creator>
      <pubDate>Wed, 01 Apr 2020 17:52:51 +0000</pubDate>
      <link>https://forem.com/mailtrap/mails-and-node-js-24h</link>
      <guid>https://forem.com/mailtrap/mails-and-node-js-24h</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;The "&lt;a href="https://blog.mailtrap.io/send-emails-with-nodejs/"&gt;send emails in Node.js&lt;/a&gt;" blog post originally was published on Mailtrap's blog.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Sending emails from Node.js is easy. We have gone over it in our previous blog post on &lt;a href="https://blog.mailtrap.io/sending-emails-with-nodemailer/"&gt;sending emails with Nodemailer&lt;/a&gt;. Last time we reviewed Nodemailer’s capabilities we focused on sending HTML emails via SMTP. In this post, we will examine how to send emails with Node.js using popular email servers like Gmail. Also, we will have a look at other transport options and packages to build and send emails from Node.js.  &lt;/p&gt;

&lt;h2&gt;
  
  
  Building and sending emails with Node.js without Nodemailer
&lt;/h2&gt;

&lt;p&gt;In some guides and tutorials, you might find a note that there are a variety of Node.js email packages but Nodemailer is the best one. It’s not true. In fact, you can barely find a decent alternative to Nodemailer (and I can hardly imagine why you might need it.)&lt;/p&gt;

&lt;p&gt;On Github, you can find several Node.js packages related to emails but they won’t offer you a wide functionality. With Nodemailer, you can create HTML emails with attachments and send them via SMTP, SES (wrapper for sending emails via AWS SES), or &lt;em&gt;sendmail&lt;/em&gt;. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The most similar package is &lt;a href="https://github.com/eleith/emailjs"&gt;Emaijs&lt;/a&gt;. Its features include: &lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;sending emails via SMTP servers (both SSL and TLS) with authentication&lt;/li&gt;
&lt;li&gt;HTML support and MIME attachments (also, attachments can be added as strings, streams, or file paths)&lt;/li&gt;
&lt;li&gt;asynchronous sending of queued emails &lt;/li&gt;
&lt;li&gt;UTF-8 encoding in headers and body.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So, the main difference is that in Emailjs you will use MIME type to work with attachments, while in Nodemailer you use strings. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Another quite popular package is &lt;a href="https://github.com/niftylettuce/email-templates"&gt;email-templates&lt;/a&gt;. As you can see from the name, this package is designed for creating various custom templates for Node.js. It features support for automatic inline CSS, stylesheets, embedded images, and fonts. Also, it has an email preview option. The email templates package was made by the creator of the &lt;a href="https://lad.js.org/"&gt;Lad&lt;/a&gt; framework. So it’s recommended to use it with Lad. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;One more package worth mentioning here is &lt;a href="https://github.com/eladnava/mailgen"&gt;Mailgen&lt;/a&gt;. It is aimed at creating HTML templates for transactional emails. There is a note on Github, that with Mailgen you can “Programmatically create beautiful e-mails using plain old JavaScript.” The package includes several open-source themes as well as supports custom elements like tables, action buttons, etc. It is your choice how to send an email created with Mailgen, but they recommend checking out Nodemailer for this purpose. &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;| &lt;strong&gt;Feature&lt;/strong&gt; | &lt;strong&gt;Nodemailer&lt;/strong&gt; | &lt;strong&gt;Emailjs&lt;/strong&gt; | &lt;strong&gt;Email templates&lt;/strong&gt; | &lt;strong&gt;Mailgen&lt;/strong&gt; |&lt;br&gt;
| Building HTML emails | yes | Yes +MIME | Yes + CSS and customization | yes+CSS+themes |&lt;br&gt;
| Email sending | SMTP, SES, &lt;em&gt;sendmail&lt;/em&gt; | SMTP | Lad | no |&lt;br&gt;
| Github rating (stars) (as on June 25, 2019) | 11,258 | 1,748 | 2,489 | 2,223 |&lt;br&gt;
| Last commit (as on June 25, 2019) | May 26, 2019 | Sept 4, 2018 | June 23, 2019 | Jan 3, 2019 |&lt;/p&gt;

&lt;p&gt;As you can see from the above table, Nodemailer is the most popular package, which offers functionality for both email creation and email sending. It’s not limited to one sending method. But it won’t be easy to create a special email template. This is why it might be a good idea to use Nodemailer in combination with another package.&lt;/p&gt;

&lt;p&gt;To find all related packages and plugins, &lt;a href="https://www.npmjs.com/search?q=nodemailer"&gt;search for nodemailer&lt;/a&gt; in npm.&lt;/p&gt;
&lt;h2&gt;
  
  
  Sending HTML emails with dynamic content
&lt;/h2&gt;

&lt;p&gt;In our previous blog post, we reviewed &lt;a href="https://blog.mailtrap.io/sending-emails-with-nodemailer/"&gt;several examples of sending HTML emails&lt;/a&gt; with Nodemailer, embedding images, and attaching files. In most cases, for transactional emails like registration confirmation or resetting passwords, you need to use dynamic content. It will be easier and more efficient to do it with one of the template modules. &lt;/p&gt;

&lt;p&gt;Let’s experiment with the &lt;a href="https://www.npmjs.com/package/email-templates"&gt;email-templates&lt;/a&gt; package. It has several interesting features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Support for different template engines (&lt;a href="https://pugjs.org/api/getting-started.html"&gt;Pug&lt;/a&gt; is a default one)&lt;/li&gt;
&lt;li&gt;Email preview (by default) in the development environment&lt;/li&gt;
&lt;li&gt;Direct email sending. So, you don’t need extra packages like Nodemailer for email sending. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;First of all, let’s create our templates, for a frequently occurring scenario: new user registration. In this example, we are working with the default option (for more details and samples of using Pug, refer to &lt;a href="https://github.com/pugjs/pug"&gt;Github&lt;/a&gt;.) &lt;/p&gt;

&lt;p&gt;Install the template engine:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.npmjs.com/"&gt;npm&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install email-templates pug
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://yarnpkg.com/"&gt;yarn&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yarn add email-templates pug
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We should create two files: subject and HTML body.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;subject.pug:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;= `Hi ${firstName} ${lastName}, happy to see you at My App!`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;html.pug:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;h1 Hello #{firstName} #{lastName}
    p.
Welcome to My App! Now your test emails will be safe. We just need to make sure your account is real. 
Please, click the button below and start using your account. 
a(href='https://example.com/confirmation') Confirm!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now make sure that your directory has the following structure:&lt;/p&gt;

&lt;p&gt;├── app.js&lt;/p&gt;

&lt;p&gt;├── emails&lt;/p&gt;

&lt;p&gt;│   └── welcome (the template name)&lt;/p&gt;

&lt;p&gt;│       ├── html.pug&lt;/p&gt;

&lt;p&gt;│       ├── subject.pug&lt;/p&gt;

&lt;p&gt;│       └── text.pug&lt;/p&gt;

&lt;p&gt;Pay attention to the text part of your message: if you don’t include it, it will be generated automatically. But if you add it, it will be rendered automatically. This means that the content of the text and HTML parts may differ. &lt;/p&gt;

&lt;p&gt;Now we can write some code to gather all the elements together and add transport. As usual, we will use &lt;a href="https://mailtrap.io/"&gt;Mailtrap&lt;/a&gt;, to be able to test and check everything. In the same way, you can use any other SMTP server like Gmail, for example. Just be careful if experimenting with real email addresses!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const Email = require('email-templates');
const email = new Email({
 message: {
   from: 'hi@example.com'
 },
 send: true,
 transport: {
   host: 'smtp.mailtrap.io',
   port: 2525,
   ssl: false,
   tls: true,
   auth: {
     user: '1a2b3c4d5e6f7g', // your Mailtrap username
     pass: '1a2b3c4d5e6f7g' //your Mailtrap password
   }
 }
});

const people = [
 {firstName: 'Diana', lastName: 'One'},
 {firstName: 'Alex', lastName: 'Another'}
];

people.forEach((person) =&amp;gt; {
 email
   .send({
     template: 'welcome',
     message: {
       to: 'test@example.com'
     },
     locals: person
   })
   .then(console.log)
   .catch(console.error);
}).
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By default, the preview of your email will be opened in your browser. It might be helpful if you are working on your template and don’t need to actually send the message. If you need to test how the variables work, and you compose a message to dozens or even hundreds of recipients, be careful with this option. To switch it off, specify &lt;em&gt;options.open&lt;/em&gt; as &lt;em&gt;false.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This is why we use Mailtrap: we will see how the message looks for each recipient, explore both HTML and text versions, and will be able to perform additional checks. With Pug and email-templates, you can build a complex template using CSS, inlined images, tables, etc. Here is an example of how it should look in the Mailtrap virtual inbox:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--psi1O4Oj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh5.googleusercontent.com/TwdtkXu-XSEkbWE4ojpb2O2pBEXItu3oJtChPpaGvXnx9F3ZW4wCru1oTDe05yL4dUOWCdwWyw-eXzxQsfH3l58Rsna_07PXopB1ZCohOtKBsjqQDMCcGocd0ceO_AW2_s57STi1" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--psi1O4Oj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh5.googleusercontent.com/TwdtkXu-XSEkbWE4ojpb2O2pBEXItu3oJtChPpaGvXnx9F3ZW4wCru1oTDe05yL4dUOWCdwWyw-eXzxQsfH3l58Rsna_07PXopB1ZCohOtKBsjqQDMCcGocd0ceO_AW2_s57STi1" alt="" width="880" height="400"&gt;&lt;/a&gt;* HTML*&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JEFR9ISD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh3.googleusercontent.com/-pqsBEo-Mr4NVbcJQetksXWMSX2QhL-Cvy_pDqyf6CscXMTGxPK1s08HfW3WTulsHR5UO45ygUdA-XmePkso_dwiRhO3PHkGNB0Kk033vAr6shEDwK6wX0jBK7G63eLddvHu8VAg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JEFR9ISD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh3.googleusercontent.com/-pqsBEo-Mr4NVbcJQetksXWMSX2QhL-Cvy_pDqyf6CscXMTGxPK1s08HfW3WTulsHR5UO45ygUdA-XmePkso_dwiRhO3PHkGNB0Kk033vAr6shEDwK6wX0jBK7G63eLddvHu8VAg" alt="" width="880" height="399"&gt;&lt;/a&gt;* Text*&lt;/p&gt;

&lt;h2&gt;
  
  
  Sending Emails with Nodemailer and SMTP
&lt;/h2&gt;

&lt;p&gt;If configuring a new message in Nodemailer, we always should start with creating a transport method. The most popular one is the SMTP server, which can be easily set up for the majority of email clients or sending providers (like Sendgrid, Outlook, Gmail, etc.) SMTP configuration will be very simple and similar. For more detailed instructions on how to use Nodemailer, refer to the “&lt;a href="https://blog.mailtrap.io/sending-emails-with-nodemailer/"&gt;Sending emails with Nodemailer explained&lt;/a&gt;” blog post.&lt;/p&gt;

&lt;p&gt;Here we will demonstrate how to send emails with Gmail as it requires some tricks related to authentication.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sending emails with Gmail 
&lt;/h2&gt;

&lt;p&gt;To be able to use Gmail to send messages via your app, you should start with several account configurations.&lt;/p&gt;

&lt;p&gt;If you use a &lt;strong&gt;plain password&lt;/strong&gt; , then you should allow access for less secure apps. &lt;/p&gt;

&lt;p&gt;If you are using &lt;strong&gt;2-Step Verification&lt;/strong&gt; , you should sign in with &lt;a href="https://support.google.com/accounts/answer/185833?hl=en"&gt;App Passwords.&lt;/a&gt; To create your password:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to the &lt;strong&gt;Security&lt;/strong&gt; section of your &lt;a href="https://myaccount.google.com/"&gt;Gmail account&lt;/a&gt;. &lt;/li&gt;
&lt;li&gt;Choose &lt;strong&gt;App Passwords&lt;/strong&gt; in the &lt;strong&gt;Signing into Google&lt;/strong&gt; block.&lt;/li&gt;
&lt;li&gt;Select the app and device from the list and press &lt;strong&gt;Generate&lt;/strong&gt;. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Please note that you can use it for your personal account only. It’s not available for accounts that are a part of an organization. &lt;/p&gt;

&lt;p&gt;What else you should remember when setting the Gmail SMTP:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Gmail will automatically set the authenticated username as the &lt;em&gt;From&lt;/em&gt; email address. To change it, you should “Add another address you own”. You will find it in your Gmail account -&amp;gt; Settings-&amp;gt; Accounts. For more details, refer to this &lt;a href="https://support.google.com/mail/answer/22370?hl=en"&gt;Google Help Center article&lt;/a&gt;. &lt;/li&gt;
&lt;li&gt;Gmail has its own &lt;a href="https://support.google.com/a/answer/166852?hl=en"&gt;email limits&lt;/a&gt;. For free (trial) accounts, it’s only 500 emails per day. If you reach the limit, your account might be suspended. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now, when you made all necessary configurations, let’s set up the Gmail SMTP as a transport in the Node.js app. &lt;/p&gt;

&lt;p&gt;Gmail SMTP hostname is &lt;code&gt;smtp.gmail.com&lt;/code&gt;, the port should be 465 for SSL connection or 587 for TLS.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var nodemailer = require('nodemailer');
var transporter = nodemailer.createTransport({
    host: 'smtp.gmail.com',
    port: 465,
    secure: true, // use SSL
    auth: {
        user: 'yourusername@gmail.com',
        pass: 'yourpassword'
    }
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To avoid authentication issues, it is recommended to use oAuth2. Nodemailer requires an &lt;em&gt;Access Token&lt;/em&gt; to perform authentication. Read the instructions on the &lt;a href="https://nodemailer.com/usage/using-gmail/"&gt;Nodemailer documentation&lt;/a&gt; to proceed with this method. &lt;/p&gt;

&lt;p&gt;Once you have retrieved client ID and client Secret, refresh token and enable Gmail API at API console. It is recommended to use &lt;code&gt;bunyan&lt;/code&gt; logger:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const bunyan = require('bunyan');
const nodemailer = require('../lib/nodemailer');

let logger = bunyan.createLogger({
    name: 'nodemailer'
});
logger.level('trace');
// Create a SMTP transporter object
let transporter = nodemailer.createTransport(
    {
        service: 'Gmail',
        auth: {
            type: 'OAuth2',
            user: 'mail',
            clientId: 'clientid',
            clientSecret: 'clientsecret',
            refreshToken: 'refreshtoken',
            accessToken: 'accesstoken',
            expires: 12345
        },
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Otherwise, to get an access token, you can use &lt;a href="https://www.npmjs.com/package/xoauth2"&gt;xoauth2&lt;/a&gt; package. &lt;/p&gt;

&lt;h2&gt;
  
  
  Sending emails without SMTP 
&lt;/h2&gt;

&lt;p&gt;If you stick to one of the popular email sending providers like &lt;a href="https://blog.mailtrap.io/sendgrid-vs-mandrill-vs-mailgun/"&gt;Sendgrid, Mandrill, Mailgun&lt;/a&gt;, or Postmark, you can integrate your Node.js app with their API directly.&lt;/p&gt;

&lt;p&gt;For AWS SES, there is a wrapper around Nodemailer, &lt;a href="https://nodemailer.com/transports/ses/"&gt;node-ses&lt;/a&gt;. You can use &lt;code&gt;aws-sdk&lt;/code&gt; directly, but &lt;code&gt;node-ses&lt;/code&gt; provides a simpler way to send complex email templates with images and attachments. &lt;/p&gt;

&lt;h2&gt;
  
  
  Bottom line
&lt;/h2&gt;

&lt;p&gt;If you are adding the email sending functionality to your Node.js app, most likely you will use Nodemailer. It is the simplest and most popular sending option compatible with other packages. &lt;/p&gt;

&lt;p&gt;Besides, there are still options for how to send emails in Node.js without Nodemailer and without the SMTP server as well. Choose the option which best suits your current environment and needs. Just don’t forget to inspect and debug your test emails before delivering them to your customers.&lt;/p&gt;

</description>
      <category>node</category>
      <category>emails</category>
      <category>javascript</category>
    </item>
    <item>
      <title>A Checklist For Evaluating the Skills of a ROR Dev</title>
      <dc:creator>Andriy Zapisotskyi</dc:creator>
      <pubDate>Wed, 16 Oct 2019 17:29:58 +0000</pubDate>
      <link>https://forem.com/azapisotskyi/a-checklist-for-evaluating-the-skills-of-a-ror-dev-3h35</link>
      <guid>https://forem.com/azapisotskyi/a-checklist-for-evaluating-the-skills-of-a-ror-dev-3h35</guid>
      <description>&lt;p&gt;Any product manager dreams of having a team of superb developers. If a squad consists of first-rate engineers, the chances of building a first-tier product increase significantly.&lt;/p&gt;

&lt;p&gt;Each company establishes its own requirements for candidates depending on the technology in question. &lt;/p&gt;

&lt;p&gt;For example, a Python engineer has to know language-specific libraries like Laravel or Symfony, as well as paradigms, databases and other tools. For that reason, a universal set of requirements can not be used.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PuzmcD0p--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.socialtalent.com/wp-content/uploads/2016/08/13557709_1490023794356993_3579202670312772577_n.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PuzmcD0p--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.socialtalent.com/wp-content/uploads/2016/08/13557709_1490023794356993_3579202670312772577_n.jpg" alt="Alt text of image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Specifically, what is needed when the goal is to hire a Ruby on Rails developer? The following checklist of soft and hard skills will be helpful in assessing a candidate’s expertise.&lt;/p&gt;

&lt;h2&gt;
  
  
  Soft skills
&lt;/h2&gt;

&lt;p&gt;These skills do not refer to software engineering at all but are no less important to evaluating the entire personality of the candidate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Empathy
&lt;/h2&gt;

&lt;p&gt;That’s an integral component of teamwork. Empathy allows you to look at something from another person’s perspective. The skill also acts as a filter of what needs to be said and why.&lt;/p&gt;

&lt;h2&gt;
  
  
  Patience
&lt;/h2&gt;

&lt;p&gt;This skill contains a very important component - respect. Being patient means respecting your teammates' opinion regardless of what you're discussing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Communication
&lt;/h2&gt;

&lt;p&gt;It’s important to differentiate between sociability and communicability. The latter is more important for team collaboration than the first one due to the focus on outcome. Effective communication consists of the ability to listen to others without interruption and clearly express one's own thoughts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hard skills
&lt;/h2&gt;

&lt;p&gt;Technical expertise of the Rails developer consists of skills in the Ruby programming language, the Ruby on Rails framework, as well as supplementary knowledge of databases, front-end technologies, and other tools. &lt;/p&gt;

&lt;h2&gt;
  
  
  The language
&lt;/h2&gt;

&lt;p&gt;The evaluation of skills in Ruby is based on two aspects. The first one is syntax, which is the reason many developers opt for this programming language. It is necessary to check the candidate’s knowledge of  Ruby’s essential elements including basic data structures, methods, loops &amp;amp; iterators, variables, etc. &lt;/p&gt;

&lt;p&gt;Another domain knowledge to take into account is object-oriented programming. Ruby is the OOP language that forces the Rails engineer to be familiar with the main concepts of the object-oriented paradigm like encapsulation, inheritance, duck typing, and others. &lt;/p&gt;

&lt;h2&gt;
  
  
  The framework
&lt;/h2&gt;

&lt;p&gt;Rubyists do not limit their knowledge to one framework, but since the goal is to hire a Rails engineer, he or she must be a pro in the following things:&lt;/p&gt;

&lt;h2&gt;
  
  
  Structure
&lt;/h2&gt;

&lt;p&gt;An app made in Rails has a structure based on the model-view-controller paradigm.  Each layers is meant for specific tasks. The candidate must know them to differentiate between where the view is and where the business logic is.&lt;/p&gt;

&lt;h2&gt;
  
  
  ORM + Active Record
&lt;/h2&gt;

&lt;p&gt;The experience in creating web apps entails the work with relational databases. ORM, which is referred to object-relational mapping, is a fundamental programming technique represented by versatile frameworks written in Ruby. Active Record is one of them that comes out-of-the-box. &lt;/p&gt;

&lt;h2&gt;
  
  
  Templating engines
&lt;/h2&gt;

&lt;p&gt;As a rule, companies mention the knowledge of two of the most popular templating systems, ERB and HAML. However, the Ruby society offers other view engines like Slim, eRuby, and others. &lt;/p&gt;

&lt;h2&gt;
  
  
  Testing frameworks
&lt;/h2&gt;

&lt;p&gt;Test-driven development is the approach widely used in building RoR apps. The framework lets you write tests easily and offers versatile testing tools. Knowledge of some of them, like RSpec or Minitest, is essential.&lt;/p&gt;

&lt;h2&gt;
  
  
  JSON API
&lt;/h2&gt;

&lt;p&gt;The framework is often leveraged for building JSON APIs. For that reason, the candidate has to know oats of the concept of application programming interface and the JavaScript Object Notation data-interchange format.&lt;/p&gt;

&lt;h2&gt;
  
  
  Front-end
&lt;/h2&gt;

&lt;p&gt;There is nothing extraordinary here. Three pillars of front-end development, HTML5, CSS, and JavaScript, are the essential expertise of any web developer. As for a Ruby on Rails engineer, these set of skills is a great bonus to his or her domain knowledge.&lt;/p&gt;

&lt;h2&gt;
  
  
  DB
&lt;/h2&gt;

&lt;p&gt;Some background knowledge of database engines is also welcomed. In most cases, it refers to MySQL and PostgreSQL due to their popularity and widespread use. NoSQL DBs lag behind in popularity, but a basic understanding of the concept won’t hurt.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code management
&lt;/h2&gt;

&lt;p&gt;Git is a superb assistant for any software developer. The chances that the candidate has no idea about pull requests or new branches are quite low. However, it is better to check this out. &lt;/p&gt;

&lt;h2&gt;
  
  
  Deployment
&lt;/h2&gt;

&lt;p&gt;The RoR teams prefer different deployment automation tools, including Heroku, Mina, Capistrano, and others. The broader list the candidate has, the better.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project management
&lt;/h2&gt;

&lt;p&gt;There are a plethora of PM tools nowadays. There is no guarantee that the candidate is familiar with the tool the company leverages. Nevertheless, his/her knowledge of some most popular tools, like Jira, Github, Trello, and others, should be checked as well.&lt;/p&gt;

&lt;p&gt;The checklist is done. Depending on the policies or rules established in the company, it can and should be updated.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Share with me in the comment section what other skill would you add to my checklist. Penny for your thoughts :)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Till next time!&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>rails</category>
    </item>
  </channel>
</rss>
