|
|
Terms of Agreement:
By using this article, you agree to the following terms...
1) You may use
this article in your own programs (and may compile it into a program and distribute it in compiled format for langauges that allow it) freely and with no charge.
2) You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.
3) You may link to this article from another website, but ONLY if it is not wrapped in a frame.
4) You will abide by any additional copyright restrictions which the author may have placed in the article or article's description. |
How to send mime enchased content (html) by E-mail. (Windows/Linux/UNIX).
Pretext:
This howto covers how you can send html based E-mail(s) by using php.
When I started out with php, one of the first things I wanted to learn was how
to send html based (E-mail) to my friends. I’m not going to bother you with
my life experience with php, so let’s start.
Content: (what this howto covers).
Pretext
Setup
Examples
FAQ
Setup:
When I first started programming php, I thought you needed to have many packages/software
installed on your computer to run all features that comes with php.
Well you don’t, all you need is, php3, apache and a mysql engine (optional).
If you already have php and apache installed, then you can scroll down to read
the rest of this howto. If you don’t got the software/packages mentioned above,
then you need to install them.
Examples:
I’ll skip the boring part, and I’m assuming you have some php knowledge.
You can download this file as an example.
After you've downloaded this file, you extract it into your htdocs/ folder or whatever folder you may use as your default webcontent excutable folder.
FAQ:
1.Does my friends/users E-mail client accept all html code?
Unfortunately, not all E-mail clients can view html code.
Ie, Microsoft Outlook 6.0 can’t view Macromedia Flash code.
But that’s another thing.
2. Can I put all kinds of html inside the body tag?
Yes, you can but remember not to have any “” (quotes) inside the $body tag.
If you’re html contains “” (quotes) you need to replace them.
Ie, $body = “"my link.php" this is my link”;
That will generate an error in the php engine.
But if you replace it with $body = “\my link.php\ this is my
link”; then php engine will accept it. The current function is called (“stripslashes”);
This bad howto was written by Peter Rekdal Sunde aka Exion.
I created this howto within an 30 minutes.
I realize that it is full of “bad spellings” but I don’t care because you can
still learn from it.
| |
Other 4 submission(s) by this author
|
|
|
Report Bad Submission |
|
|
Your Vote! |
See Voting Log |
|
Other User Comments |
4/5/2002 2:11:10 AM:Bogomil Shopov Dear Peter Rekdal Sunde,
Your article
is very good but the full MIME
requirements is not observed.
You must
include the folowing lines in your code
too:
$headers .=
|
4/5/2002 10:24:57 AM:FASTBITS Good code. But if this is for a
beginner, please use complete html(php)
code page. Thanx anyway.
|
4/5/2002 3:17:39 PM:Peter Rekdal Sunde It's a small article that teaches the
beginners how they can send html based
E-mail with php, and how easy it can be
done. The example i've added can send
html code, php code with (eval()) and
macromedia flash, and ofcourse images.
|
4/8/2002 9:20:26 AM:InteractiveWebGuys ok so where is the howto all it says is
the faq's and they don't teach you much
at all
|
|
Add Your Feedback! |
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.
NOTICE: The author of this article has been kind enough to share it with you. If you have a criticism, please state it politely or it will be deleted.
For feedback not related to this particular article, please click here. |
|