How do I send an email with an attachment using PHP?
-
I would rather learn the actual code, rather than using pre-made scripts/classes. I'm already farmiliar with sending plain-text emails and adding some headers (from, reply-to etc) Im using PHP 4.1
-
Answer:
So why don't you learn the actual code by looking at pre-made scripts/classes? It's not like it comes obfuscated or encoded... Get a copy of, say, phpMailer: http://phpmailer.sf.net/ and reverse-engineer your heart out... Generally speaking, sending e-mail with attachments requires the use of encoding (the most commonly used method is base64encode, but some applications still use UUencode) and the "Content-Type: multipart/mixed" header. You use the header to indicate that the message has attachments and to indicate the boundary (a sequence of symbols delimiting the parts). Each part, in turn, is a complete MIME message with its own "Content-Type:" header; the bodies of the parts that are binary should be encoded (so such a part will have a "Content-Transfer-Encoding:" header)...
patabuge... at Yahoo! Answers Visit the source
Other answers
check out this page http://www.intranetjournal.com/articles/200502/pij_02_16_05a.html
Andrew S
Related Q & A:
- How do i send an email to my cell?Best solution by Yahoo! Answers
- How do I send an email to my Verizon phone?Best solution by Yahoo! Answers
- How can i send an email to 6 ppl but have the To field say undisclosed recipients?Best solution by Yahoo! Answers
- How do I send an email message with Outlook?Best solution by features.en.softonic.com
- How do i send an email to more then one person in yahoo mail?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.