Skip to content
AutoHotKey
2018.01.17 22:14

ahk) Send an email 메일발송하기

조회 수 9390 추천 수 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
번호 분류 제목 날짜 조회 수
177 파이썬 파이썬으로 비활성화 된 창의 이미지를 캡쳐하는 방법 2023.02.25 4004
176 파이썬 파이썬 변수가 정의되었는지 여부 확인방법코드 2023.03.04 3993
175 컴퓨터잡담 구글 플레이스토어 file 2012.10.16 3940
174 파이썬 키움 증권 API를 이용하여 주식 자동 매매 프로그램 개발 3 2021.09.07 3928
173 Server 윈도우 time_wait 없애기 2016.03.08 3918
172 컴퓨터잡담 CPU-Z file 2019.02.23 3904
171 [Docs]스프레드시트 쇼킹한 웹 긁어오기 2014.11.11 3903
170 컴퓨터잡담 안드로이드 플래시 동영상이 안될때 해결방법 [200, Stream not found, NetStream.Play.StreamNotFound, clip: '[Clip] ...Progress] file 2015.12.01 3902
169 HTMLPHPMSQL CCS 메뉴 스타일 링크 2021.08.04 3891
168 Server 8기가 램에 맞는 Mysql config 셋팅 값 1 2016.02.22 3858
167 WindowsTip 윈도우 8.1 종료버튼 만들기 file 2015.03.21 3851
166 Server innodb_use_sys_malloc에 따라 The InnoDB memory heap is disabled mysql error 메시지 1 2016.08.23 3794
165 파이썬 파이썬 음력에서 양력변환 또는 양력에서 음력변환방법 2021.09.22 3794
164 컴퓨터잡담 파이썬 for문으로 자동변수 생성하기 2021.06.24 3790
163 WindowsTip 윈도우 8.1 업데이트 하지 않기 file 2015.03.21 3777
162 파이썬 파이썬 오류모음(에러모음) file 2021.09.09 3755
161 HTMLPHPMSQL html testing 2021.07.24 3740
160 컴퓨터잡담 언인스톨 사용하기 1 2011.02.05 3688
159 Server XE 반응형 모바일 메타태그 삽입하기 2016.08.14 3687
158 컴퓨터잡담 MP3 소리 크기 조절 프로그램 file 2016.08.14 3645
Board Pagination Prev 1 ... 36 37 38 39 40 ... 46 Next
/ 46

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


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

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

설치 취소