查看: 1731|回复: 1
|
SQL Server 2005 SQLMail 和 Database Mail疑问
[复制链接]
|
|
小弟的编程环境, windows vista business, ms outlook 2007, sql server 2005
我有一个GMail, example: ctrl@gmail.com
pop3: pop.gmail.com, 995
smtp: smtp.gmail.com 465
当我用ms outlook 2007来send & receive email through gmail, 是成功的
1) 当我用.NET来写send email时要用port 25, 而不是465, 请问是什么原因?
SQL Server 2005推出2种email method, SQLMail 和 Database Mail. 前者是旧的method, 有很多limitation, 后者是新的method, 改了很多limitation.
我用SQL Mail先,我跟着网上的方法做,在control panel->Email里新加profile名 - GoogleMail, setting和outlook2007一样,domain是ctrl-pc\ctrl. 然后把SQL Server 2005的domain改成一样。
完成后,在SQL Management Studio里的SQLMail可以看到GoogleMail了。基本上网上说到这里就可以send email了。 但当我send email时(xp_sendmail),我的另外一个email account收不到。过后我开ms outlook来看,
居然看到刚才我要send的email在Inbox里,而不是在OutBox / Sent Item里,所以send不去我另外的email。
2) 请问是什么原因?
由于SQL Mail做不到,我就用Database Mail了。用Database Mail Configuration Wizard一步一步做,setting和outlook一样。完成后就send email。结果一是不能。
如果我用smtp 465的话,error message是
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 3 (2008-03-05T10:38:56). Exception Message: Cannot send mails to mail server. (The operation has timed out.). )
如果我用smtp 25的话, error message是
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 3 (2008-03-04T23:59:33). Exception Message: Cannot send mails to mail server. (The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required 36sm1516412hub.16). )
3)有没有那位高人做过Database Mail的,而且使用GoogleMail/YahooMail/Hotmail来做remote smtp server成功的,可以请教一下吗?
我希望各位高人可以在Database Mail方面教小弟,小弟不想用SQL Mail,因为microsoft老板说了未来的sql server将放弃SQL Mail, 改用Database Mail.
谢谢 |
|
|
|
|
|
|
|
楼主 |
发表于 14-3-2008 10:45 PM
|
显示全部楼层
|
|
|
|
|
|
| |
本周最热论坛帖子
|