How to use emailjs-com - 1 common examples

To help you get started, we’ve selected a few emailjs-com examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zero-to-mastery / visual-music / src / pages / LandingPage / sections / SectionThree / FormComponents / ContactForm.js View on Github external
<img src="{require('../../../../../assets/LoadingAssets/LoadingBars.svg')}" alt="loading">
            )
        });
        //add this simple check for begging -
        if (name.length &gt; 0 &amp;&amp; email.length &gt; 0 &amp;&amp; message.length &gt; 0) {
            let templateParams = {
                name: name,
                email: email,
                message: message,
                dynamicColor: ''
            };

            emailjs
                .send(
                    // 'default_service' and 'visual-music' are coresponse to visual-music user dash configs at emailjs.com
                    'default_service',
                    'visual_music',
                    templateParams,
                    process.env.REACT_APP_emailJS
                )
                .then(response =&gt; {
                    this.resetForm();
                    this.setState({
                        span: 'email has been sent, thank you :)',
                        dynamicColor: 'black'
                    });
                })
                .catch(err =&gt; {
                    console.log('FAILED', err);

emailjs-com

Send emails using predefined templates and your private email account

BSD-3-Clause
Latest version published 3 years ago

Package Health Score

50 / 100
Full package analysis

Popular emailjs-com functions