1

Assume a user visited your site and signed up for an account, but such user never did Sign in to your site anymore.

Is there any way to generate mails to such visitors, for letting them know about your products and services?

1

Yes there is a way to use the Rules module for this (as the tagging of your question seems to indicate), as detailed below ...

Step 1 : Create a Rules Component to send an eMail

Create a Rules Component (say "Rule1") for sending an eMail that corresponds to the eMail you have in mind "... for letting him know about your products and services ...". This Rules Component itself will not do anything on its own. Instead it will be used in a subsequent step.

Have a look at "Step 2" of my answer to "How to send an email to an author on a specific date using date field specified in a node?" for an example of such Rules Component.

If you have multiple types of eMails in mind, then create 1 such Rules Component for each of them.

Step 2 : Schedule an eMail reminder

Create a rule (say "Rule2") which uses Rules Event "After saving a new user account" to schedule the execution of the Rules Component created in Step 1, e.g. X days after the new account was created.

Have a look at "Step 3" of my answer to "How can I set a reminder for a specific user to be triggered on a specific date?" for an example of how to schedule the execution of a Rules Component. More specifically the part in the Rules Action that starts with "schedule" (for this ignore the part with "schedule_delete").

If you have multiple types of eMails in mind (e.g. 1st eMail after X days, 2nd eMail after Y days, 3rd eMail after Z days) then schedule the execution of all these Rules Components right away. Or create a chain whereas the 1st Rule Component (for after X days), will schedule the 2nd Rule, etc.

Attention: if you're planning for multiple eMails, you should use some 'convention' to identify the scheduled eMails. E.g. by using an "identifier" (within "schedule") that is not just "[account:name]", but instead something like (e.g.) "[account:name]-1", "[account:name]-2" and "[account:name]-3".

If nothing happens (i.e. if such newly created user never logs in, you have your desired eMails in place for being sent after X (and or Y, and or Z) days.

Step 3: Cancel eMail reminders when user logs in

Create a rule (say "Rule3") like so:

  • Use Rules Event "User has logged in".
  • Add a Rules Condition using "Data value is empty" to check if account:last-login is actually empty. If that's the case, it implies this user logs in for the very first time, which is exactly what you are interested in. Because from then on, you don't want to send the scheduled eMails anymore.
  • Add a Rules Action to delete (cancel) the scheduled eMails. Have a look at "Step 3" of my answer to "How can I set a reminder for a specific user to be triggered on a specific date?" for an example of how to delete (cancel) the planned execution of a scheduled Rules Component. More specifically the part in the Rules Action that starts with "schedule_delete" (for this ignore the part with "schedule").

    Attention: if you're planning for multiple eMails, you should use some 'convention' to identify the scheduled eMails to be deleted (cancelled). E.g. by using an "identifier" (within "schedule") that is not just "[account:name]", but instead something like (e.g.) "[account:name]-1", "[account:name]-2" and "[account:name]-3". And of course make sure these identifiers match with the convention you've used in Step 2 (to schedule those eMails).

0

Account reminder

Account reminder is a simple module that will resend the welcome email to users who have registered with the site but have not yet logged in. The admin can control the initial time before sending a reminder, the time period between subsequent reminders and the total number of reminders to send. The email that is sent is also fully customization.

Mass Messaging

This module allows you to send mass messages to users. To compose and select recipients the Views module is used. This allows complex selection queries setup by a administrator. The mapping of the view fields and the subject, recipient, message body and the attachments is done in the view. To send a message the view plus the arguments of the view are put into a queue. The cron does then send the messages in the background.

  • True, both modules seems to be a possible alternative to answer this question. But they don't have an official release available. That seems like a kind of red flag to me. – Pierre.Vriens Feb 25 '16 at 18:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy