Search code examples
htmlnode.jsemailsendgriddeep-linking

Deep link in HTML email not opening app on mobile


I have a deeplink embedded in my HTML form which is submitted via SendGrid API on nodeJS.

Although the user is able to receive the email, they are unable to click on it.

        <!DOCTYPE html>
        <html>
            <head>
                <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
                <meta name="viewport" content="width=device-width, initial-scale=1.0">
           </head>
           <body>
                <div class="main">
                <div>
                    <h1>Welcome to Example</h1>
                    <button disabled style="font-size:20px;">Connect</button>
                </div>
                <div class="content">
                    <p>A request to reset your password has been made. If you did not make this request, simply ignore this email. If you did make this request, please reset your password below.</p>
                </div>
                <div>
                <form action="exampleapp://resetpassword/" target="_blank">
                    <input type="submit" value="Reset Password" style="background: #00008B; padding: 10px 50px; border: none; color: #FFF"/>
                </form>
                </div>
                <div>
                    <h2><a href="https://www.example.com/en" target="_blank">Example Here</a></h2>
                </div>
                </div>
            </body>
            <footer>
                <div>
                    <p>Having trouble viewing this email?</p>
                    <a href="#">Contact our support team.</a>
                </div>
            </footer>
        </html>

I have tried changing <form><input /></form> to <a href="exampleapp://resetpassword/"> but to no avail.

Kindly help, thanks


Solution

  • I have created a custom solution using AWS and NodeJS.

    For more information, read https://roycjh.medium.com/how-to-direct-users-from-email-to-your-mobile-app-or-website-using-deep-links-2727af0fc74a