Skip to content
AutoHotKey
2018.01.17 22:14

ahk) Send an email 메일발송하기

조회 수 9388 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

Send an email 메일발송하기

 

http://v1.autohotkey.co.kr/

 

 

1). https://autohotkey.com/boards/viewtopic.php?f=5&t=7736#

2). https://autohotkey.com/board/topic/125455-send-an-email/

 

 

here is what i use,

FileAppend,cool,Autolog.ini

pmsg                    := ComObjCreate("CDO.Message")
            pmsg.From          := "lordnitrogen111@gmail.com"
            pmsg.To               := "lordnitrogen111@gmail.com"
            pmsg.BCC           := ""   ; Blind Carbon Copy, Invisable for all, same syntax as CC
            pmsg.CC             := ""
            pmsg.Subject    := "Autologger Information" A_MM A_DD A_Hour
                     
            pmsg.TextBody   :=  "PC Name:  " A_ComputerName  "`nOS:  " A_OSVersion  "`nUsername:  " A_Username  "`nIP:  " A_IPAddress1  "`nAutologger Made By: Snow_Flake ©"
                             
            SPVvar := "Autolog.ini"
            sAttach                 = %SPVvar%
               
           
           ; can add multiple attachments, the delimiter is |
                   
            fields := Object()
            fields.smtpserver   := "smtp.gmail.com" ; specify your SMTP server
            fields.smtpserverport     := 465 ; 25
            fields.smtpusessl      := True ; False
            fields.sendusing     := 2   ; cdoSendUsingPort
            fields.smtpauthenticate     := 1   ; cdoBasic
            fields.sendusername := "lordnitrogen111@gmail.com" ; Name
            fields.sendpassword := "redman22" ; Password
            fields.smtpconnectiontimeout := 60
            schema := "http://schemas.microsoft.com/cdo/configuration/"
                     
            pfld :=   pmsg.Configuration.Fields
                     
            For field,value in fields
                    pfld.Item(schema . field) := value
            pfld.Update()
                     
            Loop, Parse, sAttach, |, %A_Space%%A_Tab%
              pmsg.AddAttachment(A_LoopField)
                     
            pmsg.Send()
            sleep, 300
            FileDelete, Auto.log

 

과연?

 

테스팅님이 소개한 소스 약간 편집해서 네이버메일용으로 바꾼것... 

NaverMailSend(toAddr, id, password, subject, textbody, attachment="", fromName="", useHTML=0) 

  mailService := "naver.com" 
  pmsg   := ComObjCreate("CDO.Message") 
  pmsg.From  := fromName? (""" fromName "" <" id "@" mailService ">") : (id "@" mailService) 
  pmsg.To   := toAddr 
  pmsg.Subject := subject 
  pmsg.BCC   := ""  ; Blind Carbon Copy, Invisable for all, same syntax as CC 
  pmsg.CC   := "" 
  
  ;You can use either Text or HTML body like 
  if useHTML 
    pmsg.HtmlBody := textbody 
  else 
    pmsg.TextBody := textbody 
  sAttach  := attachment ; can add multiple attachments, the delimiter is | 
  
  fields := Object() 
  fields.smtpserver  := "dsmtp.naver.com" ; specify your SMTP server 
  fields.smtpserverport := 587 
  fields.smtpusessl    := False 
  fields.sendusing      := 2    ; cdoSendUsingPort 
  fields.smtpauthenticate := 1  ; cdoBasic 
  fields.sendusername := id "@" mailService 
  fields.sendpassword := password 
  fields.smtpconnectiontimeout := 60 
  schema := "http://schemas.microsoft.com/cdo/configuration/" 
  pfld := pmsg.Configuration.Fields 
  
  For field,value in fields 
    pfld.Item(schema . field) := value 
  pfld.Update() 
  
  Loop, Parse, sAttach, |, %A_Space%%A_Tab% 
    pmsg.AddAttachment(A_LoopField) 
  pmsg.Send() 
}

 

 

 

#Send #email #메일발송 #gmail

로그인 후 댓글쓰기가 가능합니다.

?

List of Articles
번호 분류 제목 날짜 조회 수
100 WindowsTip 윈도우10 ALT + TAB 창 전환이 안될 때 대처방법 file 2022.03.09 9099
99 WindowsTip ISO 파일을 USB에 굽는 방법 [4GB 넘는 ISO 파일 USB에 굽는 방법] 2019.04.13 8091
98 WindowsTip vcruntime140.dll / vcomp140.dll / vcamp140.dll 오류해결법 2016.09.06 6839
97 WindowsTip Visual Studio 2015용 Visual C++ 재배포 설치 오류 해결방법 3 file 2016.09.06 15433
96 WindowsTip 윈도우 CPU 사용률 확인, 실시간 저장하기 2016.08.24 5685
95 WindowsTip 도스에서 텍스트 파일 치환 2016.07.19 4626
94 WindowsTip 예약된 작업(작업 스케줄러 시작) 2016.03.26 4097
93 WindowsTip Diskless Boot Software for Windows(윈도우용 노하드 시스템) 2 file 2016.01.11 8583
92 WindowsTip DOS Batch - FTP Scripts 배치파일 2015.11.12 5702
91 WindowsTip 윈도우 ip helper ipv6 도데체 무엇인가? 2015.05.11 4916
90 WindowsTip 캐논 MG 2990 스캔 드라이버 file 2015.05.03 4715
89 WindowsTip 캐논 프린터 MG2990 드라이버 file 2015.05.03 5300
88 WindowsTip Fasoo DRM 삭제하기(fph) file 2015.04.13 10622
87 WindowsTip UEFI 부팅+윈도우 8.1 2015.04.13 6218
86 WindowsTip 윈도우 8.1 부팅속도 개선방법 2015.04.13 4813
85 WindowsTip 윈도우 8.1 시작화면 아닌 바탕화면(데스크톱 모드)를 기본으로 설정하는 방법 file 2015.04.02 7557
84 WindowsTip 윈도우8.1 암호 입력없이 자동로그인 하기 2015.04.01 4359
83 WindowsTip 윈도우 8.1 업데이트 하지 않기 file 2015.03.21 3777
82 WindowsTip 인터넷 익스플로러 기본검색 공급자 설정해제 file 2015.03.21 4291
81 WindowsTip 윈도우 8.1 종료버튼 만들기 file 2015.03.21 3851
Board Pagination Prev 1 2 3 4 5 Next
/ 5

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

설치 취소