mail addAttachment

225 views
Skip to first unread message

Cliff Ford

unread,
Feb 7, 2012, 11:45:33 PM2/7/12
to joomla-...@googlegroups.com
In libraries/joomla/mail/mail.php the addAttachment function is passed
in parameters for name, encoding and type that are not passed on to
phpmailer - so attachments all use application/octet-stream as the
mime-type. This is a bit of pain so I have to hack the core to add a
function that does pass on the values. Is there some good reason for
this behaviour? Or is it a long forgotten oversight?

Cliff

Ofer Cohen

unread,
Feb 8, 2012, 12:15:10 AM2/8/12
to joomla-...@googlegroups.com

This is probably a bug, cause there is no use of encoding & type in the method, and I've checked the parent object:
  public function AddAttachment($path, $name = '', $encoding = 'base64', $type = 'application/octet-stream') {
The encoding & type should be send to the parent (on lines 278 & 283).

I don't know how to implement sending of few attachments with different encoding or types in the same method call, but this is minor.

Nevertheless, please make a pull request to get this fixed.

Ofer Cohen
Joomlics Anonymous Group

Cliff Ford

unread,
Feb 9, 2012, 5:10:26 AM2/9/12
to joomla-...@googlegroups.com
Pull request? Er... I am not able to do that. Maybe I should just file a
bug report?

Cliff

> --
> You received this message because you are subscribed to the Google
> Groups "Joomla! CMS Development" group.
> To post to this group, send an email to joomla-...@googlegroups.com.
> To unsubscribe from this group, send email to
> joomla-dev-cm...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/joomla-dev-cms?hl=en-GB.

elin

unread,
Feb 9, 2012, 6:25:40 AM2/9/12
to joomla-...@googlegroups.com
If it's just a small change in one file it's really easy. Register at github.
Go to the appropriate file.


Click on fork and edit, make your changes and then describe why in the appropriate field.

Then save and you will get an option to turn it into a pull request.

Presto you're a Joomla code contributor.

Elin
Reply all
Reply to author
Forward
0 new messages