2010. 12. 23. 15:18

PowerShell 에서 메일보내기.


Write "테스트메일 발송입니다."
Send-MailMessage -to admin@duck.pe.kr -from duck@duck.pe.kr -subject "Text_Mail" -body "본문내용 메일입니다.." -attachment "D:\WWW_ROOT\check.zip" -smtpserver 127.0.0.1



* 모든 문의 Send-MailMessage 뒤에 붙은것은 모두 한줄로 하셔야 합니다.
* SMTP는 localhost 로 하였으며, spf 등록으로 스팸에 빠져들지 않도록하였습니다.
   잘~ 가더군요.