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 (Moderator: Donald Lobo) »
  • Add an attachment to mailings: ready to be shared
Pages: [1]

Author Topic: Add an attachment to mailings: ready to be shared  (Read 2514 times)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Add an attachment to mailings: ready to be shared
June 03, 2008, 03:08:16 am
Hi,

Now you can add one attachment to a mailing. I've reused the existing file and file entity features of civicrm.

Still have one problem to solve: can't retrieve the "real" toto.doc name, only the name of the file as stored, with a MD5 appened to the name.

Couldn't find it in the BAOs or DAOs provided. Any help greatly appreciated.

How to send you the modification ? svn diff as an attachment to an issue ?

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

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Add an attachment to mailings: ready to be shared
June 03, 2008, 02:17:05 pm

1. can u create an issue and attach the patch to the issue

2. You can get the real file name, by eliminating the last 33 character of the base name. We should make this a utility function in CRM/Utils/File.php and use that to display the file name. The md5 is added to avoid collisions with the same uploaded file names (it is not an md5 of the filename)

thanx for stepping up and doing the needful.

lobo


A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Add an attachment to mailings: ready to be shared
June 08, 2008, 06:11:51 am
http://issues.civicrm.org/jira/browse/CRM-3187

Couldn't "simply" suppress the 33 last characters, as some attachments have one or several extensions (.blah.unknown). Might just be that I misunderstood something.

For now on, the attachment name is ugly...

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

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Add an attachment to mailings: ready to be shared
March 21, 2009, 09:03:48 pm
Hi - just wondering where this got to - I see the functionality but on two systems when I attach a png or pdf to a single email sent to a contact I receive lots of gobbledegook rather than attachment. Am I missing a setting? cheers
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Add an attachment to mailings: ready to be shared
March 21, 2009, 11:35:00 pm
And an html msg with no attachment gets delivered as

--=_3c48ea745d6140d7f762b0f168c2e536
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset="utf-8"


--=_3c48ea745d6140d7f762b0f168c2e536
Content-Transfer-Encoding: 8bit
Content-Type: text/html; charset="utf-8"

<p>Hi (the text that follows comes from Token = contact.first_name which is Peter and then the token = contact.last_name which is Davis<br />
<br />
so what tokens do is pull the information from that persons record and puts them in the email, so when sending to hundreds of people it can personalise the email, and include their contact details so they can check if they are correct.<br />
<br />
And yes the attachments seems to fail - have raised on forum.</p>
--=_3c48ea745d6140d7f762b0f168c2e536--

So again, keen to know if I am missing some settings. cheers
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Add an attachment to mailings: ready to be shared
March 22, 2009, 07:31:40 am

there was a bug in 2.2.0 with attachments and multi-part emails

this is fixed in 2.2.1

here's the patch if u'd like to apply it now

http://fisheye.civicrm.org/browse/~br=v2.2,author=lobo/CiviCRM/branches/v2.2/CRM/Utils/Mail.php?r1=20321&r2=20342

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Add an attachment to mailings: ready to be shared
March 22, 2009, 01:04:18 pm
Thanks Lobo - really appreciate this.
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Add an attachment to mailings: ready to be shared

This forum was archived on 2017-11-26.