[pmwiki-users] ZAP question

The Editor editor at fast.st
Sun Oct 29 11:27:39 CST 2006


On 10/29/06, marc <gmane at auxbuss.com> wrote:
> Crisses said...
> >
> > On Oct 29, 2006, at 4:07 AM, The Editor wrote:
> >
> > > On 10/29/06, dso <dso at moosoft.com> wrote:
> > >> I did not find this info on the site.  Can ZAP handle emailing a file
> > >> attachment?
> > >>
> > >> I have this sort of hack going right now:
> > >> http://www.moosoft.com/moosoft_new/TheCleaner/WebSubmit
> > >>
> > >> But ZAP seems like a much better solution.
> > >>
> > >> Daniel
> > >
> > > No, that's one thing zap can't do.  But if you can show me a code
> > > snippet how you did it in your email form, it should be easy to add to
> > > zap.  Guessing it's probably no more than adding one or two lines of
> > > code.  And I'd be happy to add the feature.
> >
> > Adding attachments to emails is a few more than two lines of code.
> >
> > You start getting into adding mime/parts to emails, and how to encode
> > binary->text transmissions.  Not impossible. Not even HARD.  Just not
> > only a simple change.
> >
> > I suggest finding a snippet of code that does it and adapting it --
> > Zend's library probably has an email w/attachments script.  I know I
> > found something recently, somewhere.
> >
> > Here's the code snippet library area from Zend for emails:
> > http://www.zend.com/codex.php?CID=11
> >
> > See if that helps!
>
> I've mentioned the phpmailer class before and recommend it. With it, you
> do something like:
>
>  $mail = new PHPMailer();
>  $mail->From = "blah at blah.com";
>  $mail->AddAddress("person at somewhere.com");
>  $mail->Subject = "subject";
>  $mail->Body    = "body";
>  $mail->AddStringAttachment ($filedata, "data.txt", "base64",
> "application/octet-stream");
>  $mail->Send();


So what do you do?  Add the script to your cookbook, and include it in
your config file?

Then of course, change the zap code to accommodate the above?  I'm
downloading it right now.

Cheers,
Caveman




More information about the pmwiki-users mailing list