[pmwiki-users] ZAP question
marc
gmane at auxbuss.com
Sun Oct 29 11:02:38 CST 2006
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();
--
Best,
Marc
More information about the pmwiki-users
mailing list