 # Preference center

  #### **Choose your preferences**  
  
Do you want to be informed about the latest developments at EasyPost? Select here which updates you want to receive:











**EasyPost Updates:** Don't miss out on our latest services, products and special offers! EasyPost Updates keep you up to date with innovative solutions that make your mail processing more efficient and cost-effective.  
  
**Events &amp; Webinars:** Keep up to date with interesting (online) events and meetings.  
  
**Newsletters:** Receive the latest articles, tips, and news about document flows and our services.  
  
**Operational Updates:** Make sure you don't miss anything that might affect our service, such as changes in services or updates on the holidays.

Choose what information is important to you, so you only receive what is relevant. We take care of the rest!







E-mail


					    // Function to get the email parameter from the URL
					    function getEmailFromUrl() {
					        const urlParams = new URLSearchParams(window.location.search); // Parse the URL parameters
					        return urlParams.get('email'); // Return the 'email' parameter value if it exists
					    }

					    // Function to save email to localStorage when it changes
					    function saveEmailToLocalStorage() {
					        const emailField = document.getElementById('email_preference'); // Get the email input field
					        localStorage.setItem('email', emailField.value); // Save the email value to localStorage
					    }

					    // Function to restore email from localStorage on page load
					    function restoreEmailFromLocalStorage() {
					        const savedEmail = localStorage.getItem('email'); // Get the saved email from localStorage
					        const emailFromUrl = getEmailFromUrl(); // Get email from the URL (if present)

					        // If there's an email in the URL, use it; otherwise, use the email from localStorage
					        if (emailFromUrl) {
					            document.getElementById('email_preference').value = emailFromUrl;
					            localStorage.setItem('email', emailFromUrl); // Save email from URL to localStorage
					        } else if (savedEmail) {
					            document.getElementById('email_preference').value = savedEmail; // Restore from localStorage
					        }
					    }

					    // Add event listener to email field to save on change
					    document.getElementById('email_preference').addEventListener('input', saveEmailToLocalStorage);

					    // Restore email on page load, either from URL or localStorage
					    document.addEventListener('DOMContentLoaded', function() {
					        restoreEmailFromLocalStorage(); // Restore email when the page loads
					    });
					PreferenceEasyPost Updates  
Events  
Newsletters  
Operational Updates
					        // Function to update the food preference input field
					        function updatePreference() {
					            // Get all checkboxes with the class 'preference-checkbox'
					            var checkboxes = document.querySelectorAll('.preference-checkbox');
					            
					            // Initialize an array to hold the selected values
					            var selectedValues = [];
					            
					            // Loop through the checkboxes and add the values of checked ones to the array
					            checkboxes.forEach(function(checkbox) {
					                if (checkbox.checked) {
					                    selectedValues.push(checkbox.value);
					                }
					            });
					            
					            // Join the array into a comma-separated string and set the value of the input field
					            document.getElementById('txtPreference').value = selectedValues.join(', ');
					        }

					        // Attach event listeners to each checkbox
					        document.querySelectorAll('.preference-checkbox').forEach(function(checkbox) {
					            checkbox.addEventListener('change', updatePreference);
					        });

					        // Initial update in case some checkboxes are pre-checked
					        setTimeout(function() {
						        updatePreference(); // Call the function after 200 miliseconds
						    }, 300);
					    

Url to website

I would like to opt-out from all email communications


						// Function to update preference checkboxes based on opt-out checkbox state
						function updateCheckboxes() {
						    const optInCheckbox = document.getElementById('opt_in'); // Get the "opt-out all" checkbox

						    // If the "opt-out" checkbox is checked, uncheck all .preference-checkbox checkboxes
						    if (optInCheckbox.checked) {
						        document.querySelectorAll('.preference-checkbox').forEach(function(checkbox) {
						            checkbox.checked = false; // Uncheck all preference checkboxes
						        });

						        // clear the hidden input field
					            document.getElementById('txtPreference').value = '';
						    }

						    // Save the opt-in checkbox state to localStorage
						    localStorage.setItem('opt_in', optInCheckbox.checked);
						    savePreferencesToLocalStorage(); // Save preference checkboxes as well
						}

						// Function to uncheck the "opt-out all" checkbox when a preference is manually selected
						function uncheckOptIn() {
						    const optInCheckbox = document.getElementById('opt_in');
						    optInCheckbox.checked = false; // Uncheck the "opt-out all" checkbox

						    // Save the opt-in checkbox state to localStorage
						    localStorage.setItem('opt_in', optInCheckbox.checked);
						    savePreferencesToLocalStorage(); // Save preference checkboxes as well
						}

						// Function to save the states of all preference checkboxes to localStorage
						function savePreferencesToLocalStorage() {
						    const preferences = {};
						    document.querySelectorAll('.preference-checkbox').forEach(function(checkbox) {
						        preferences[checkbox.id] = checkbox.checked; // Save each checkbox state by its ID
						    });
						    localStorage.setItem('preferences', JSON.stringify(preferences));
						}

						// Function to restore the states of checkboxes from localStorage
						function restoreCheckboxesFromLocalStorage() {
						    const optInState = localStorage.getItem('opt_in');
						    if (optInState !== null) {
						        document.getElementById('opt_in').checked = JSON.parse(optInState); // Restore opt-in checkbox
						    }

						    const preferences = JSON.parse(localStorage.getItem('preferences')) || {};
						    document.querySelectorAll('.preference-checkbox').forEach(function(checkbox) {
						        if (preferences.hasOwnProperty(checkbox.id)) {
						            checkbox.checked = preferences[checkbox.id]; // Restore each preference checkbox
						        }
						    });
						}

						// Attach an event listener to the "opt-in" checkbox to trigger the uncheck behavior
						document.getElementById('opt_in').addEventListener('change', updateCheckboxes);

						// When any .preference-checkbox is clicked, uncheck the #opt_in checkbox
						document.querySelectorAll('.preference-checkbox').forEach(function(checkbox) {
						    checkbox.addEventListener('change', uncheckOptIn);
						});

						// On page load, restore the checkbox states from localStorage
						document.addEventListener('DOMContentLoaded', function() {
						    restoreCheckboxesFromLocalStorage(); // Restore checkboxes when the page loads
						});


				     More information about the processing of your personal data can be found in our [privacy policy](/en/privacy-policy). 



Send