写了一个简单的发送HTML邮件的PHP函数。

  函数说明:send_mail("发件人地址", "收件人地址", "邮件主题", "邮件正文");

  示例:send_mail($from, "info@zyan.cc", "这是邮件的主题", "<html><head></head><body><p><font color=red>这是邮件正文</font></p></body></html>");

  代码如下:


Tags:
技术大类 » PHP/JS/Shell | 评论(43) | 引用(0) | 阅读(39874)
suso
2007-11-21 14:16
不要密码么?
渝满江城 Homepage
2007-11-23 17:40
开源就是好啊,PHP的函数库真的是太强大了
低调
2008-1-8 11:51
这是要求运行代码的机器装有Mail服务器
水草萍 Homepage
2008-1-25 12:40
前提应该是:
在php.ini里设置了smtp服务器,和连接smtp服务器的用户名和密码
Homepage
2008-1-29 21:55
精炼
phphp
2008-7-2 12:01
$subject上需要做下编码, 不然容易乱码
啊啊啊啊
2008-9-15 22:50
[email]name@domain.com[/email][quote]文字[/quote]
2009-5-8 15:20
我碰到一个奇怪的现象。

我在台式机和笔记本上都设置了同样环境的虚拟主机,用的是APMServe的同样版本。数据库和PHP脚本都是完全一样(相互copy的)。脚本中用到“mail($to,$subject,$message,$headers);”。

同样的这个php文件,在台式机上用得好好的(能正常发出邮件,对方信箱能正常收到)。但在笔记本上却没有反应(不发信,收不到)。可以肯定的是,笔记本是在联网状态。我现在就是在用本子上网发的贴子。

在APM的“邮件设置”中,我设置了自己单位的信箱(当作发出信箱);另外在PHP脚本中设置了我的接受信箱。

我还查了一下,发现:
台式机的php.ini中,[mail function];For Win32 only……那个地方的设置仍是默认的localhost和me@example.com,并没有变成其他参数。即使是在能够收发邮件的情况下;
而笔记本方面,即使在APM的“邮件设置”中已经按台式机的同样设置好,并且,即使再将php.ini的[mail function]都做了改动,笔记本上的mail()仍然不能发出信。

我实在没有别的办法了,请大师帮忙指点。
菜鸟 Email
2010-9-27 11:30
请教php发送带图片的html邮件,怎么实现?
coach factory outlet Email Homepage
2012-5-17 11:15
Today, following half a century, mentor leather-bases coach factory outlet continues to be the delicate craft of leather-based master is accountable for,Would you like to meet more friends, or go with the times? If yes, coach factory online is opening welcome doors to you.in the market you definitely can find various colorways that are designed in as well as the high quality that applied in. For most of you would like to come. So just come to our coach factory outlet online store to choose one.
louis vuitton sale Email Homepage
2012-5-17 11:15
Louis Vuitton belt at louis vuitton sale is one kind of fashion accessory with high cost performance among the Louis Vuitton accessories.Offering quality LV products with favorable prices, louis vuitton outlet store is at your service. Hurry up, or you can not seize the chance.in fact, louis vuitton is one of the most famous fashion design master.he opened the fist suitcase shop called after his name.
coach outlet online Email Homepage
2012-5-17 11:15
I heard of coach outlet online through the advertisement when I was shopping. And now I often brow the webpage and buy Coach bags online.It is a symbol regarding position not to mention nature.Here I would like to launch a excellent bags pertaining to business men.Which may be coach outlet store.coach outlet has always been simple,durable style features to win consumers.The products are more flexible,with easy bleaching,wear characteristics,and simply use a damp cloth.
coach outlet, Email Homepage
2012-5-17 11:16
Remember the coach outlet provide coach bags which won't be deteriorated into its overall styles by any means. It will maintain its looks, colors, and uniqueness for long time.coach outlet store online has been voted by Hour Detroit magazine readers as the Best of Detroit in their 12th annual readers'poll.Lots of women like which usually amount normally include a coach outlet online ,it provides coziness to many girls that don't even think it is a great bushel of great interest directly to them.
Coach  Outlet Email Homepage
2012-5-18 10:39
Coach Outlet was founded in 1941, in a loft in New York City.as a partnership called the Gail Manufacturing Company. Gail Manufacturing Company began as a family-owned business, with six leatherworkers who made small leather goods, such as wallets and handbags.Coach Outlet Online Store guarantee that all the coach handbags offered are own high quality. In addition , all of them are sold at an unexpected low price.If you want to purchase, just visit their website. 
Coach  Outlet Email Homepage
2012-5-18 10:45
Five years later in 1985, the Cahns decided to sell Coach Outlet after determining that none of their three children had any desire to take over the family leatherware business . Coach was then sold to Sara Lee Corporation for $30 million dollars.electric, diesel and mainline electric multiple units (EMU, DMU, MEMU), metro Coach Outlet Canada and Diesel Electric Tower Cars (DETC), Accident Relief Medical Vans (ARMV), Inspection Cars (RA), Fuel Test Cars, Track Recording Cars, the latest coaches are for the Deccan Odyssey . 
Louis Vuitton Email Homepage
2012-5-18 10:51
During this period, Louis Vuitton incorporated its leather into most of its products, ranging from small purses and wallets to larger pieces of luggage.To emphasize Jacobs's fashionable volte face, Kate Moss-last season's saucy Louis Vuitton UK dominatrix was recast for spring as the ballerina on that music box in a gleaming white baby doll frock and Barbie white stilettos. 
Louis Vuitton UK Email Homepage
2012-5-18 10:57
This Louis Vuitton UK for sale belongs to the sounding just what are termed as Louis Vuitton vintage best sellers, many other products and services for the reason that range appearing companies.In 1983, the company joined with America's Cup to form the Louis Vuitton Cup, a preliminary competition (known as an eliminatory regatta) for the yacht race. 
xujie777 Email
2012-5-18 16:34
We aim to make all our customers satisfy with our products. You will find a variety of Men's fashion louis vuitton uk, fashion Women's cheap Louis Vuitton bags in our store at affordable price.Thinking of interesting ways to cost a milestone birthday? louis vuitton online shop had one of the most distinctive distinctive celebrations.bakery along with living room operated by means of about three moment louis vuitton online Most effective Pastry Chef’s of the year Rammy Nominee Chef’s.
xujie777 Email
2012-5-18 16:34
The choices are likely to be basically countless seeing that louis vuitton outlet occurs with the help of completely new and also incredible concepts once in a while.Louis vuitton Wholesale Monogram Canvas HandbagsLouis Vuitton Collection Beach Handbags louis vuitton bags outlet Damier Canvas HandbagsLouis vuitton Mahina HandbagsLouis Vuitton Monogram Mini Lin HandbagsLouis Vuitton Monogram Multicolore HandbagsLouis vuitton Monogram Vernis HandbagsLouis Vuitton Wholesale Epi Leather HandbagsLouis Vuitton For Men HandbagsLouis Vuitton Damier Canvas WalletsLouis Vuitton Epi Leather WalletsLouis Vuitton Monogram Canvas WalletsLouis Vuitton Monogram Vernis WalleLouis Vuitton ShoesLouis Vuitton Men wallets.As the Authentic Louis Vuitton are so high-priced, so came the louis vuitton handbags outlet.
xujie777 Email
2012-5-18 16:35
coach outlet has become a popular shopping experience for consumers around the world, and a desirable distribution channel for manufacturer's and retailers.Getting your hands on coach outlet store online can be a hefty investment of hundreds of dollars.But do not despair,the Coach Outlet store could be the answer to your prayers.coach outlet online is your smart choice when you want to get the discount Coach accessory. You can find the exact Coach Bags and other accessory you want at a low price that's right for you. My dear friends, let the coach outlet online pave your way into the world of high fashion with their ultimate fashion factory.
分页: 1/3 第一页 1 2 3 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]