¾È±Ô °øºÎ¹æ

ACTIVE SERVER PAGE > ¸ÞÀϸµ ¸®½ºÆ®

µî·ÏÀÏ : 2017-07-04 17:45 Á¶È¸¼ö : 52,468

À̹ø¿¡´Â ¸ÞÀϸµ ¸®½ºÆ®¸¦ ±¸ÇöÇϱâ·Î ÇÏÀÚ.
¸ÕÀú ¾Æ·¡¿Í °°ÀÌ ¸ÞÀϸµ ¸®½ºÆ®¸¦ °¡ÀÔÇÏ´Â ÆûÀ» ¸¸µéÀÚ.
ÀÌÁ¨ ÀÌ·± ºÎºÐÀº ½±°Ô ±¸ÇöÀÌ °¡´ÉÇÒ °Å¶õ »ý°¢ÀÌ µç´Ù... ±×·¯³ª, ¿©±â¼­ Áß¿äÇÑ °ÍÀº
°ü½ÉºÐ¾ß º°·Î ¿©¼ö°ü·ÃÀÚ·á,Çؾç,,, ÀÎÅÍ³Ý ÃÖ½ÅÁ¤º¸µî,,,
°ü½ÉºÐ¾ß¸¦ ¼±ÅÃÀ» ¹Þ¾Æ¼­ °ü½ÉºÐ¾ß°¡ ÀûÇÕÇÑ »ç¶÷µé¿¡°Ô ¸ÅÀÏÀ» º¸³»°Ô µÇ´Â °ÍÀÌ´Ù.
(¿©±â¼­´Â °ü½ÉºÐ¾ß´Â ¿©·¯°³°¡ µÉ ¼öµµ ÀÖ´Ù. )


 
¾Æ·¡ÀÇ ±×¸²Àº ¸ÞÀÏÀ» º¸³»´Â ÆûÀÌ´Ù. ÆÄÀÏ Ã·ºÎ¸¦ ºñ·ÔÇؼ­ °ü½ÉºÐ¾ß¸¦ ¼±ÅÃÀ» ÇÏ¸é °ü½ÉºÐ¾ß°¡
µ¿ÀÏÇÑ È¸¿ø¿¡°Ô ¸ðµÎ ¸ÞÀÏÀ» º¸³»°Ô µÇ´Â °ÍÀÌ´Ù.

 
subject = request("subject")
 
	if request("file")<>"" then
		filename=request("file")
	end if

	if NOT IsNull(Request("sele1")) then
		sele=Request("sele1")
	end if
       
	if NOT IsNull(Request("sele2")) then
		sele=sele & Request("sele2")
	end if
 
	if NOT IsNull(Request("sele3")) then
		sele=sele & Request("sele3")
	end if
 

	 ' sele º¯¼ö¿¡´Â °ü·ÃºÐ¾ßÀÇ °ªµéÀÌ µÇ´Â °ÍÀÌ´Ù. ¿©±â¿¡¼­´Â sele1,sele2,sele3 À¸·Î a,b,c °ªÀ¸·Î 
	³Ñ¾î¿À°Ô µÇ¸ç, 
	üũ°¡ µÇ¾î ÀÖ´ÂÁö µÇ¾î ÀÖÁö ¾ÊÀºÁö¸¦ ºñ±³ÇÏ°Ô µÇ¾î seleº¯¼ö¿¡ ÇÕÇÏ°Ô µÈ´Ù.  

	k=Len(sele)
 
	sql="select mail,sele from email where "
 
	if k=1 then
		sql=sql& "sele LIKE'%" & sele & "%' "
	else
	for i=1 to k
		find= Mid(sele,i,1)
		sql=sql & "sele LIKE'%" & find & "%' "
       
		if i<>k then 
			sql=sql & " or "
		end if 
        
		next      
	end if   

	' ´ÙÀ½Àº ¸ÞÀϸµ ¸®½ºÆ®¸¦ ±¸ÇöÇϱâ À§ÇÑ °ÍÀÌ´Ù. ½±°Ô ¸»Çؼ­ ȸ¿øÀÇ °ü½ÉºÐ¾ß¿Í ³»¿ëÀÇ 
	°ü½ÉºÐ¾ß°¡ ÀÏÄ¡ÇÏ´Â (Çϳª ¶óµµ) »ç¶÷µéÀÇ ¸ÞÀÏÀ» ÃëÇÏ°Ô µÇ´Â °ÍÀÌ´Ù.  Á¶±Ý¸¸ º¸¸é ½±°Ô ·ÎÁ÷ÀÌ 
	ÀÌÇØ°¡ °¡¸®¶ó »ý°¢µÈ´Ù. 
    
	content = request("content")
	content = replace(content,"chr(13)& chr(10)","<br>")

	Set db = Server.CreateObject("ADODB.Connection")
	db.Open("DSN=polcomm;UID=sa;PWD=;")
	SEt rs=db.Execute(sql)
 
	do while not rs.eof 
	set objMail=Server.CreateObject("CDONTS.NewMail")
 
	' CDO ÄÄÆ÷³ÍÆ®ÀÇ °´Ã¼¸¦ »ý¼º ÇÑ´Ù. ÀÌ °´Ã¼¸¦ Loop ¾È¿¡ ³ÖÀº ÀÌÀ¯´Â CDO ÄÄÆ÷³ÍÆ®´Â Send ¸í·ÉÀ» 
	»ç¿ëÇÏ°Ô µÇ¸é ÀÚµ¿ ¼Ò¸êµÇ±â ¶§¹®ÀÌ´Ù.

	if filename<>"" then
		objMail.attachFile(filename)
	end if


	'È­ÀÏÀÌ ºñ¾îÀÖÁö ¾ÊÀ¸¸é ÆÄÀÏÀ» Àü¼ÛÇÏ°Ô µÈ´Ù. 
  
	objMail.To=trim(rs("mail"))
	objMail.From="aaa@aaa.co.kr"
	objMail.Subject=subject

	objMail.BodyFormat=1    ' ÅؽºÆ®·Î º¸³½´Ù.   html Çü½ÄÀº '0'ÀÌ µé¾î°£´Ù.
	objMail.MailFormat=1     ' ÅؽºÆ®·Î º¸³½´Ù.   html Çü½ÄÀº '0'ÀÌ µé¾î°£´Ù.
	objMail.body=content     ' º¸³¾ ³»¿ëÀ» Body¿¡ ¿¬°áÇÑ´Ù. 
	objMail.Send           ' ÀÌÁ¨ ¸ÞÀÏÀ» º¸³»°Ô µÈ´Ù.
 
	rs.movenext
	loop
 
	set objMail=nothing
	


     
cdonts ¸¦ ÀÌ¿ëÇؼ­ ¸ÞÀÏ ¹ß¼ÛÈÄ ¹ÞÀºÀ¯¹«¸¦ È®ÀÎÇϴ¹ý
 
Set MailObject = Server.CreateObject("CDONTS.NewMail") 
	MailObject.From = "lcand@netian.com" 
	MailObject.To = "lcand@daum.net" 
	MailObject.Value("Return-Receipt-To") = "aaa@netina.com" 
	MailObject.Subject = "Å×½ºÆ®" 
	MailObject.Body = "Å×½ºÆ®³»¿ë" 
	MailObject.Send 
	Set MailObject = Nothing 
  
	¿©±â¼­ ´Ù½Ã ¸ÞÀÏ ¹Þ´Â ºÎºÐÀÔ´Ï´Ù 
	MailObject.Value("Return-Receipt-To") = "aaa@netina.com" 
 
¡Ø Ȥ½Ã µµ¿òÀÌ µÇ¼Ì´Ù¸é ´ñ±Û¿¡ ÇѸ¶µð ³²°ÜÁÖ¼¼¿ä!
ÀÛ¼ºÀÚ   ºñ¹Ð¹øÈ£
ÀÚµ¿±Û ¹æÁö     (ÀÚµ¿±Û ¹æÁö ±â´ÉÀÔ´Ï´Ù.)
³»¿ë   ´ñ±Û´Þ±â 
À̸ÞÀÏ ¹®ÀÇ : cak0280@nate.com  
Copyright 2000 By ENTERSOFT.KR All Rights Reserved.