2012年3月1日 星期四

利用Power Shell完成從SQL撈資料+自動寄信功能(2)


補充一下實際撰寫時遇到的其他小問題:

1.憑證不足:

http://social.msdn.microsoft.com/Forums/zh-HK/237/thread/f67bed2e-1073-4964-88a9-7672a4ec3584

2.一次大量寄信會被視為spam的解決方法:
使用powershell的sleep,在每寄完一次信之後隔個2秒再繼續測下一封!
powershell delay的方法
http://powergui.org/thread.jspa?threadID=10285


In PowerShell v1 you can add delay by doing:
[System.Threading.Thread]::Sleep(10000)

In PowerShell v2 there is a start-sleep cmdlet:
Start-Sleep -Second 10 

沒有留言:

張貼留言