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) »
  • Activity type when contact is the from address should be Email Out
Pages: [1]

Author Topic: Activity type when contact is the from address should be Email Out  (Read 720 times)

malks

  • I post occasionally
  • **
  • Posts: 81
  • Karma: 7
  • CiviCRM version: 3.4.x 4.x
  • CMS version: Drupal 6.22
  • MySQL version: 5.1.x
  • PHP version: 5.3.x
Activity type when contact is the from address should be Email Out
May 10, 2012, 11:54:40 pm
Hi,

We're using email to activity processing to process a sent mail folder and this is mostly working well. The only issue is that the email that is in the from address should see the activity as an Email Out rather than an Inbound Email. Is there a way around this? I thought using this hook would be useful but I don't think it helps me out.

Thanks,
Malks.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Activity type when contact is the from address should be Email Out
May 11, 2012, 12:16:25 am
The problem is that the email is one single activity, so it can't have a different type based on which contact you see it from, an email is either to be inbound email or email no matter which contact (from, to, cc or bcc).

This being said, it would be a useful improvement to be able to record it differently if the from is a "team member" or "external".

In the first case, it should be registered as an email (outgoing) in the second as an inbound email.

Would you be willing to work on it?
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

malks

  • I post occasionally
  • **
  • Posts: 81
  • Karma: 7
  • CiviCRM version: 3.4.x 4.x
  • CMS version: Drupal 6.22
  • MySQL version: 5.1.x
  • PHP version: 5.3.x
Re: Activity type when contact is the from address should be Email Out
May 11, 2012, 12:26:02 am
Hi Xavier,

Thanks for the reply, I thought that might be the case. This isn't for me personally so if I can talk client into it will be happy to jump in :) How hard (i.e. how much time) would it be do you think?

Malks.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Activity type when contact is the from address should be Email Out
May 11, 2012, 01:20:49 am
Hi,

Not sure what's the best implementation, either 'hardcode/configure' a (normal not smart) group "team" and configure somewhere (civicrm.setting.php or as a param to the cronjob) its id as the civicrm_team id.

or create a module that is using the pre hook on activity type=inbound to check if the from is a team member. This option seems to be more flexible, but not sure we got enough information in the hook to be able to do the test team/not team properly.

Changing the code itself is probably between 4h & 8h, but testing emails takes an awful lot of time, so I'd say 8 to 16h.

For the hook, would need to validate, but shouldn't be longer if everything needed is there.
X+
« Last Edit: May 11, 2012, 01:28:06 am by xavier »
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

malks

  • I post occasionally
  • **
  • Posts: 81
  • Karma: 7
  • CiviCRM version: 3.4.x 4.x
  • CMS version: Drupal 6.22
  • MySQL version: 5.1.x
  • PHP version: 5.3.x
Re: Activity type when contact is the from address should be Email Out
May 11, 2012, 01:52:37 am
Hmm. I already know if they're part of the team (they have a role in Drupal). I'm thinking for this use case, just ignore the email if a contact is part of the team. It will be recorded against the other parties anyway, and I wonder whether there is utility in having lots of sent emails against a team member... it's the grouping against the other parties that we care about. Thanks for the direction. If I do anything with it I'll make sure to post back.

Malks.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Activity type when contact is the from address should be Email Out
May 11, 2012, 03:44:59 am
Ok, so the hook would allow you to test against the role.

Recording the team member as the sender is useful (and necessary to have a "owner" for the activity anyway)

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Activity type when contact is the from address should be Email Out

This forum was archived on 2017-11-26.