PageSourceSearch

https://vasucarrental.netlify.app/js/subscribemail.js

js vasucarrental.netlify.app collected 2026-10-03 11:34:22 UTC 1,550 bytes, 41 lines download raw bytes

1document.getElementById('subscribe-form').addEventListener('submit', function(event) {
2    event.preventDefault(); // Prevent the default form submission
3
4    // Get email address
5    const email = document.getElementById('subscribeEmail').value.trim();
6
7    // Basic validation
8    if (!email) {
9        alert('Please enter an email address.');
10        return;
11    }
12
13    // Prepare the email content
14    const emailContent = `
15    <h2>New Subscription Request</h2>
16    <p><strong>Email:</strong> ${email}</p>
17`;
18
19    // Send subscription email using Sendinblue API
20    axios.post('https://api.sendinblue.com/v3/smtp/email', {
21        sender: { email: '[email protected]' },
22        to: [{ email: '[email protected]', name: 'Suganth M' }], // Replace with the recipient email
23        subject: 'New Subscription Request',
24        htmlContent: emailContent
25    }, {
26        headers: {
27            'Content-Type': 'application/json',
28            'api-key': '' // Replace with your Sendinblue API key
29        }
30    })
31    .then(response => {
32        document.getElementById('subscribeSuccessMessage').style.display = 'block';
33        document.getElementById('subscribeErrorMessage').style.display = 'none';
34        document.getElementById('subscribe-form').reset(); // Clear the form
35    })
36    .catch(error => {
37        document.getElementById('subscribeErrorMessage').style.display = 'block';
38        document.getElementById('subscribeSuccessMessage').style.display = 'none';
39        console.error('Error:', error);
40    });
41});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.