0

I have set up a newsletter subscription system using mailchimp.

I have set up a welcome email that goes out immediately after a visitor of a landing page subscribes.

This is for a series of emails which must go out every friday after the welcome email is sent.

How do I do this? I don't seem to find that option within mailchimp, it only allows me to send immediately, or a specific amount of days after xyz.

I have tried to choose a date-based list, but I'm starting to think I will have to let the subscriber choose the next possible Friday from a calendar module when signing up. I'm really trying to avoid this though.

Basically I need the email to be sent out on the first Friday after a welcome email was sent out. Currently it seems that I can only send it a certain amount of days after the welcome email. Lets say the person subscribes on a tuesday, and I set it to 3 days afterwards. Everyone who subscribes on a tuesday will get the first email of the next series on a Friday. If someone subscribes on any other day of the week however, they will not get the emails of the series on a Friday.

I am comfortable using basic PHP and javascript. If I have to code it somehow, please advise where to start.

Russel Fish
  • 31
  • 1
  • 10

1 Answers1

1

Try setting the date in either JavaScript or PHP and using a hidden input type. MailChimp says it’s safe to alter the type. Here’s a sample JS implementation:

var nextFriday = new Date();

nextFriday.setDate( nextFriday.getDate() + ( 5 + 7 - nextFriday.getDay() ) % 7 );

document.getElementById('nextFriday').value = formatDate(nextFriday);
console.log( 'this shows it works!', document.getElementById('nextFriday').value );


function formatDate(dt) {
  return padNum( dt.getMonth() + 1 ) + '/' + padNum( dt.getDate() ) + '/' + dt.getFullYear();
}

function padNum(num) {
  return ( num < 10 ) ? '0' + num : num;
}
<input type="hidden" id="nextFriday" name="whateverMCgivesYou" value="">

Date getting based off this answer. It used 5 (in 5 + 7 ...) because you want Friday. MailChimp expects mm/dd/yyyy format

  • @RusselFish Any luck? –  Feb 26 '19 at 21:13
  • 1
    Sorry man, I haven't forgotten about this question. I'm meeting with the Client tomorrow to fully explain the options. I'm hoping to avoid any programming at first, by doing a welcome campaign which is one email that goes out on the next friday after someone subscribes. (That is available without coding on mailchimp). Then I'll create a second campaign to start 7 days after someone receives the welcome mail, and receive each next email 7 days afterwards. All this is available without coding. Might be useful in future to know how to code these things, so I'll revisit your solution asap – Russel Fish Feb 27 '19 at 20:01