CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Manually unsubscribe users from civimail in the DB
Pages: [1]

Author Topic: Manually unsubscribe users from civimail in the DB  (Read 1185 times)

strangefeatures

  • Guest
Manually unsubscribe users from civimail in the DB
June 12, 2008, 10:24:18 pm
We're migrating components of a drupal site over to CiviCRM. We had our mailing lists in drupal stored in a custom version of a drupal mailer module simplenews. Some drupal users have unsubscribed in the past/ have never subscribed to our mailing lists, so I would like to copy the preferences into CiviMail. I can extract a list of drupal user IDs corresponding to the users who aren't subscribed to any mailing lists (and hence a list of contact IDs), but and I would like to import this list, preferably as direct DB query, but I can't really work out how to do this.

There is the do_not_email fields in the contact table - is this the appropriate way to do this? Ideally I would like to simulate a mail opt-out, but it's not all clear how to do that using the civimail tables.

pankaj

  • Guest
Re: Manually unsubscribe users from civimail in the DB
June 15, 2008, 10:16:02 pm
do_not_email field is checked to restrict the contact from getting any kind of mail(including 'civimail' and 'send mail to contact').
While opt-out is for restricting from group mail (using civimail) only.
If you can extract different lists of unsubscribed and subscribed users and able to import them separately then the solution is easy :-
1) Create a group(your mailing list in CiviCRM).
2) While importing unsubscribed users don't assign them any group.
3) While importing subscribed users assign them the group.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Manually unsubscribe users from civimail in the DB

This forum was archived on 2017-11-26.