본문 바로가기

Web Program/Asp Lecture27

CDONTS.NewMail 를 이용하여 메일 보내기 Set sMail = server.createobject("CDONTS.NewMail") sender_email = "webmaster@" & Ref receiver_email = Request("email") smail.from = sender_email smail.to = receiver_email smail.subject = mail_title smail.BodyFormat = 0 smail.MailFormat = 0 smail.body = mail_body smail.send set sMail = nothing 2008. 9. 8.
메일 발송 public sub SendSmtpMail( byval sender , byval receiver , byval subj_ , byval body_ ) Dim iMsg Set iMsg = CreateObject("CDO.Message") Dim iConf Set iConf = CreateObject("CDO.Configuration") Dim Flds Set Flds = iConf.Fields With Flds ' assume constants are defined within script file .Item(cdoSendUsingMethod) = 2 ' cdoSendUsingPort .Item(cdoSMTPServer) = "SMTP서버 주소 .Item(cdoSMTPConnectionTimeout) =.. 2008. 9. 8.
asp 에서 ftp 사용하기 안녕하세요 보통 ftp는 wsh의 shell함수를 사용합니다. 예를들어 아래 간단한 vbs코드는 두개 파일을 ftp서버로 보냅니다. 한가지 문제는 쉘함수는 asp에서 또는 asp에 연결된 컴포넌트에서 사용이 어려운 점입니다. 쉘함수를 실행하는 컴포넌트들이 있지만 테스트해보지 않았습니다. 제가 간단하게 isapi에 걸어서 돌려보면 돌아가긴 하는데 메모리해제가 안됩니다. 구성요소를 사용하기엔 너무 번거롭고... 그러므로 스케줄러같은데 걸수 있는 상황이라면 제격이라고 하겠습니다. 이외에 비주얼스튜디오에 wininet 컨트롤과 api가 있습니다. 여기서 ftp를 사용할수 있는데, 서버당 동시사용한도가 제한적입니다. 그래서 asp에 동적으로 걸어서 사용하는것은 제한적으로만 가능할겁니다. 혹시 이 부분 코드가 필요.. 2008. 9. 8.
ABC Upload 예제파일 start | toatee http://blog.naver.com/toatee/20015181007 700000 then Response.Write "" Response.end else FileWholePath = GetUniqueName(FileName, DirectoryPath) File.Save FileWholePath End if End if '++++++++++완료++++++++++++++++++ '----------------------------------------- '최재남-------- '파일이 올바르게 저장되었으면 dbInsert 하고 '아니면 에러 보내면서 다시 저장 하게 한다. '올바르게 저장 되었는지 아는 방법은 asp의 파일 객체를 '생성해서 체크한다. 위의 파일명을 가지고 같.. 2008. 9. 8.