How to calculate date for autoresponder/automailer

Events happening in the community are now at Drupal community events on www.drupal.org.
cibson's picture

Hi everybody!

I want to make an email autoresponder, so that you can do something like this:

After user registration send:
Email 1: immediatly;
Email 2: in 3 days
Email 3: in 8 days
Email 4: in 15 days
aso.

I want to use that for an email course.

Here a short description what i have done so far:

I made a contenttype autoresponder. It has just one additional field: days to delivery (integer).

Triggered Rule:
Conditions: Fire on user registration
Actions: Component Rule 1

Component Rule 1: Get Autoresponder nodes
Load a list of entity objects from a VBO View and get the autoresponder nodes

Loop through nodes
in every Loop fire Component Rule 2:

Component Rule 2: Schedule Emails
Conditions: Entity has field days_to_delivery
Actions:add/calculate a Varible: Date = Now + days to delivery field -- here i have my problems
Schedule component evaluation (use calculated date and fire component rule 3)

Component rule 3: send mail to user
Actions: send email
requires the node title (email subject), the node body (email content) and the registered user (emailadress).

Everything works fine, except of the date calculation. I tried a lot, but nothing seems to work.
Add a Variable (Date): there i have no dataselector for the days_to_delivery integer field.
Calculate a value: here i cant add the current date with an integer.
In the Offset Settings of Rules Scheduler i cant use variables.

Maybe someone can give me a hint or show me how to calculate the new date with custum php.

thx

Rules

Group organizers

Group categories

Categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week