# emailjs.send

The basic method to send an email with EmailJS.

# Syntax

emailjs.send(serviceID, templateID, templateParams, userID);

# Rate Limit

1 request per second

# Parameters

NAME TYPE DESCRIPTION
serviceID String Service ID of the service through which the email should be sent. Reserved keyword 'default_service' is supported, and should be used to use the default service, which can be set and changed via EmailJS dashboard.
templateID String Template ID of the email
templateParams Object Template parameters of the template.
userID String (optional) User ID of the account. It’s not required if you used the init method.

# Result

The method returns the Promise. Where response is object what contains the status and the text properties.

# Code Example

var templateParams = {
    name: 'James',
    notes: 'Check this out!'
};
 
emailjs.send('YOUR_SERVICE_ID', 'YOUR_TEMPLATE_ID', templateParams)
    .then(function(response) {
       console.log('SUCCESS!', response.status, response.text);
    }, function(error) {
       console.log('FAILED...', error);
    });