1
m0nty
xoopsmailer Class, help needed with mod.
  • 2006/2/2 19:41

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


is it possible and if so, how can i modify the xoopsmailer class or XOOPS multimailer class to add attachments to the email?

i tried adding $mail->setAttachment() to the code,

and then adding the Vars etc in the xoopsmailer class, etc, but it still didn't send the attachment..

i know it's something to do with the headers, encoding and boundary.

encoding is set at 8bit in the mailerclass and i have to alter headers from text etc to multipart/mime for the mime types.. i did manage to get it to send once but the attachment was displayed in the email itself as binary code..

i'm not sure how i can setup xoopsmailer, to add the correct boundary, and multipart headers mimetypes and correct encoding for the file (base64) aswell as normal 7bit encoding for the message body..

xoopsmailer only seems to send single part text messages out, but i know the phpmailer class can handle it.

function send() contains some header info, but where to put the necessary changes??

i have got the module sending attachments by not using the xoopsmailer class, with hard coded headers.. but if possible i'd prefer it to use the xoopsmailer class instead.. or possibly just to create an extended phpmailer class in the module itself and use the class.phpmailer.php class file. would this be the easier option in writing a new extended mail class rather than modifying xoopsmail.php

any help appreciated..

2
Catzwolf
Re: xoopsmailer Class, help needed with mod.
  • 2006/2/2 19:52

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


The current XoopsMailer Class cannot send attachments. You can however extent the class using the mail class, that I know does have this functionality.

Login

Who's Online

479 user(s) are online (59 user(s) are browsing Support Forums)


Members: 0


Guests: 479


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Sep 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits