You had an <input> tag in your email, so I assumed you were trying to
upload the file. If the file is not already on the server, you *will*
have to upload it before emailing it. But that's a whole other
matter.

If you look at the classes and see how they attach a file, you should
be able to figure it out. Basically, you need to set the correct
headers (content-type) and attach an encoded version of the file in
the body of the email. 

An easy way to see what you need it to send yourself an email with an
attachment and look at the raw source of the email you receive. It
should look a bit like this (with a whole lot more headers in it):

From: "Mark" <[EMAIL PROTECTED]>
To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
Subject: FW: test
Content-Type: multipart/mixed;
        boundary="----_=_NextPart_000_01C346F1.7A8C7496"

This message is in MIME format. Since your mail reader does not
understand
this format, some or all of this message may not be legible.

------_=_NextPart_000_01C346F1.7A8C7496
Content-Type: multipart/alternative;
        boundary="----_=_NextPart_001_01C346F1.7A8C7496"


------_=_NextPart_001_01C346F1.7A8C7496
Content-Type: text/plain;
        charset="iso-8859-1"

This is the body of the email 
 <<test.jpg>> 


------_=_NextPart_000_01C346F1.7A8C7496
Content-Type: image/jpeg;
        name="test.jpg"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
        filename="test.jpg"

/9j/4AAQSkZJRgABAQEBLAEsAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHR
HBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMj
MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAJaAb
AhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAw
AAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKS
ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmq
.
.
.
------_=_NextPart_000_01C346F1.7A8C7496--


--- szparag <[EMAIL PROTECTED]> wrote:
> no.
> 
> i`m not trying to upload file on server.
> i want to send e-mail with attachments but if it's possible without
> using classes.
> 
> i thought that file should be first uploaded and then send with
> e-mail as
> attachment, maybe uploading isn't correct...
> 
> i don't know how to do it.
> 
> szparag
> 
> >
> >  
> >
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=====
Mark Weinstock
[EMAIL PROTECTED]
***************************************
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***************************************

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to