
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
mailchimp-submitter
Advanced tools
yarn add mailchimp-submitter
# or
npm install mailchimp-submitter
Create your HTML form
<!-- Ensure you add data-mc to your form to mailchimp-submitter will find it -->
<form data-mc="true" id="my-form">
<!-- Add required fields including: 'project', 'datacenter', 'u', 'id' -->
<input type="hidden" name="project" value="MY-PROJECT-NAME" />
<input type="hidden" name="datacenter" value="us7" />
<input type="hidden" name="u" value="XXXXXXXXXXXXXXXXXXXXXXXXX" />
<input type="hidden" name="id" value="XXXXXXXXXX" />
<!-- Add mailchimp fields -->
<input type="email" name="EMAIL" />
<input type="text" name="FNAME" />
<input type="text" name="LNAME" />
<button>Subscribe</button>
</form>
Import functions in your JavaScript and initialize Mailchimp Submitter
import MailchimpSubmitter from 'mailchimp-submitter'
// Initialize mailchimp submitter on your forms with data-mc="true"
MailchimpSubmitter()
MailchimpSubmitter({
// Optional callback before submitting form to Mailchimp.
// Return false in this callback to cancel the form request (IE. validation).
beforeSubmit: _formEl => {
const isValid = validateForm()
return isValid
},
// Optional callback after Mailchimp response
callback: (_formEl, resp) => {
if (resp.result === 'success') {
alert('Successfully subscribed')
} else {
alert('Error: ' + resp.msg)
}
},
})
const myForm = document.getElementById('my-form')
myForm.addEventListener('mcBeforeSubmit', () => {
console.log('Submitting form...')
})
myForm.addEventListener('mcCallback', ({ detail: resp }) => {
if (resp.result === 'success') {
alert('Successfully subscribed')
} else {
alert('Error: ' + resp.msg)
}
})
FAQs
Easily itegrate your forms with Mailchimp
The npm package mailchimp-submitter receives a total of 2 weekly downloads. As such, mailchimp-submitter popularity was classified as not popular.
We found that mailchimp-submitter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.