asp.net C# ·¢ËÍ Óʼþ ºÍ ¸½¼þ ´úÂë
˵µ½·¢ËÍÓʼþ·¢ËÍ£¬ÏÈÌáÒ»ÏÂSMTP(ºÇºÇ£¬¸ßÊÖ¾ÍÌø¹ýÕâÒ»¶Î°É£¡)¡£ SMTPµÄÈ«³ÆÊÇ“Simple Mail Transfer Protocol”£¬¼´¼òµ¥Óʼþ´«ÊäÐÒé¡£ËüÊÇÒ»×éÓÃÓÚ´ÓÔ´µØÖ·µ½Ä¿µÄµØÖ·´«ÊäÓʼþµÄ¹æ·¶£¬Í¨¹ýËüÀ´¿ØÖÆÓʼþµÄÖÐת·½Ê½¡£SMTP ÐÒéÊôÓÚ TCP/IP ÐÒé´Ø£¬Ëü°ïÖúÿ̨¼ÆËã»úÔÚ·¢ËÍ»òÖÐתÐżþʱÕÒµ½ÏÂÒ»¸öÄ¿µÄµØ¡£SMTP ·þÎñÆ÷¾ÍÊÇ×ñÑ SMTP ÐÒéµÄ·¢ËÍÓʼþ·þÎñÆ÷¡£
ÔÙ¼òµ¥½éÉÜÒ»ÏÂÃû³Æ¿Õ¼ä£¨NameSpace£©System.Web.MailÀà¿âÀïËùÌṩµÄÓʼþ·¢Ë͵ĶÔÏó¡¢ÊôÐԺͷ½·¨
(1)ËüÓÐÈý¸öÀࣺSmtpMail¡¢MailMessageºÍMailAttachment¡£ÕâÈý¸ö¶ÔÏó±¾ÎĵÄʾÀý³ÌÐò´úÂëÖж¼Ó¦Óõ½ÁË£¡
1. MailMessage ,ÌṩÊôÐԺͷ½·¨À´´´½¨Ò»¸öÓʼþÏûÏ¢¶ÔÏó¡£(Provides properties and methods for constructing an e-mail message.)
2. MailAttachments – ÌṩÊôÐԺͷ½·¨À´´´½¨Ò»¸öÓʼþ¸½¼þ¶ÔÏó¡£(Provides properties and methods for constructing an e-mail attachment.)
3. SmtpMail – ÌṩÊôÐԺͷ½·¨Í¨¹ýʹÓÃwindows 2000 CDOSYS µÄÏûÏ¢×é¼þµÄÁªºÏÊý¾Ý¶ÔÏóÀ´·¢ËÍÓʼþÏûÏ¢£©¡£(Provides properties and methods for sending messages using the Collaboration Data Objects for Windows 2000 (CDOSYS) message component)
(2)¸÷¸öÀàµÄÊôÐÔ¡£
1.Ïȼòµ¥½éÉÜSmtpMailµÄÊôÐÔ£º SmtpServer -- SMTPµÄµØÖ·¡£
2.Ö÷ÒªÀ´½éÉÜMailMessage¶ÔÏóµÄÊôÐÔ
from -- ·¢ËÍÓʼþµÄµØÖ·
To -- ½ÓÊÜÓʼþµÄµØÖ·
Subject -- ÓʼþµÄ±êÌâ
Priority -- ÓʼþµÄÓÅÏȼ¶£¨ÓÐЧֵΪHigh,Low,Normal£©
Attachments -- ·µ»ØÒ»¸ö¼¯ºÏ£¬´ú±í¸½¼þ
Bcc -- ÃÜË͵
Ïà¹ØÎĵµ£º
¼´Ê¹ÎÒ½«Êý¾Ý¿â·ÅÔÚÏîÄ¿ÄÚ½¨µÄÎļþ¼ÐdbÏ£¬¿ÉÊǽøÐд洢²Ù×÷µÄʱºò£¬Êý¾Ý±íûÓÐÈκα仯¡£ºóÀ´·¢ÏÖ´¢´æ¸Ä±ä·¢ÉúÔÚbin\\debug\\dbĿ¼ÏµÄÊý¾Ý¿âÖУ¬Õâ¸öÊý¾Ý¿âÊÇÔÚ³ÌÐòÔËÐÐʱ×Ô¶¯¸´ÖƹýÈ¥µÄ£¬¿ÉÊÇΪʲô´æ´¢±ä»¯Ã»Óз´Ó¦µ½ÍâÃæÏîÄ¿ÄÚµÄÊý¾Ý¿âdbÏÂÄØ£¿ÎÒÏëÁ¬½Ó×Ö·û´®ÖÐdatasourceÖеÄdatadirectory´æÔÚһЩÐþ»ú£¬ÓÚÊÇÎÒÕÒµ½Ò ......
µ± ASP.NET ½ÓÊÕÕë¶ÔÒ³µÄÇëÇóʱ£¬Ëü´ÓÏ̳߳ØÖÐÌáÈ¡Ò»¸öÏ̲߳¢½«ÇëÇó·ÖÅä¸ø¸ÃÏ̡߳£
Ò»¸öÆÕͨµÄ£¨»òͬ²½µÄ£©Ò³ÔÚ¸ÃÇëÇóÆڼ䱣ÁôỊ̈߳¬´Ó¶ø·ÀÖ¹¸ÃÏß³ÌÓÃÓÚ´¦ÀíÆäËûÇëÇó¡£Èç¹ûÒ»¸öͬ²½ÇëÇó³ÉΪ I/O bound£¨ÀýÈ磬Èç¹ûËüµ÷ÓÃÒ»¸öÔ¶³Ì Web ·þÎñ»ò²éѯһ¸öÔ¶³ÌÊý¾Ý¿â£¬²¢µÈ´ýµ÷Ó÷µ»Ø£©£¬ÄÇô·ÖÅä¸ø¸ÃÇëÇóµÄÏß³ÌÔÚµ÷Ó÷µ»Ø֮ǰ´ ......
Introduction
In this article, we will take a closer look at how ASP.NET pages post back to themselves, and how to customize this feature in our web applications.
function __doPostBack(eventTarget, eventArgument)
One of the most important features of the ASP.NET environment is the ability to decla ......
ÏÂÃæÒª½â¾öµÄÎÊÌâÈçÏ£º
1.ÈçºÎÔÚJavaScript·ÃÎÊC#º¯Êý?
¡¡¡¡2.ÈçºÎÔÚJavaScript·ÃÎÊC#±äÁ¿?
¡¡¡¡3.ÈçºÎÔÚC#ÖзÃÎÊJavaScriptµÄÒÑÓбäÁ¿?
¡¡¡¡4.ÈçºÎÔÚC#ÖзÃÎÊJavaScriptº¯Êý?
¡¡¡¡ÎÊÌâ1´ð°¸ÈçÏ£º
¡¡¡¡javaScriptº¯ÊýÖÐÖ´ÐÐC#´úÂëÖеĺ¯Êý£º
¡¡¡¡·½·¨Ò»£º
&nbs ......