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) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Can't get attachment in hook_civicrm_emailProcessor
Pages: [1]

Author Topic: Can't get attachment in hook_civicrm_emailProcessor  (Read 467 times)

demeritcowboy

  • Ask me questions
  • ****
  • Posts: 570
  • Karma: 42
  • CiviCRM version: Always the latest!
  • CMS version: Drupal 6 mostly, still evaluating 7.
  • MySQL version: Mix of 5.0 / 5.1 / 5.5
  • PHP version: 5.3, usually on Windows
Can't get attachment in hook_civicrm_emailProcessor
March 18, 2013, 06:33:14 pm
Searched but didn't find anything, and I haven't verified the problem, but have a guess, so maybe will help others: The $mail object passed into the hook appears to know about the attachments, but since Civi moves them from the temporary file used during original parsing, they don't exist anymore at that location.

Calling $mail->generateBody() gives blank attachment sections.

A workaround is to use $result['id'] to get the newly created activity id, and locate the attachments from there.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Can't get attachment in hook_civicrm_emailProcessor

This forum was archived on 2017-11-26.