我在SQL Server 2008中設置數據庫郵件來發送郵件到我的Gmail帳戶。以下是DBMail的詳細信息資料我已經創建:通過SQL Server發送電子郵件失敗
email id : [email protected]
Display Name : xyz
Reply email :
Server name : smtp.gmail.com
port no: 587
Check : This server requires a secure connection
Check : Basic Authentication
username : [email protected] (should have gmail.com)
password : <mypassword>
confirm password : <mypassword>
然後我點擊下一個,也使得它默認的公衆形象。
然後我用下面的TSQL代碼來配置和發送DBMail:
EXEC sp_CONFIGURE 'show advanced', 1
GO
RECONFIGURE
GO
EXEC sp_CONFIGURE 'Database Mail XPs', 1
GO
RECONFIGURE
GO
use msdb
go
EXEC sp_send_dbmail
@profile_name='XYZ',
@recipients='[email protected]',
@subject='Test message',
@body='Message Sent Successfully'
The output appears "Message Queued"
不過我的消息是越來越失敗。我覺得我已經正確安裝了服務器。任何輸入將不勝感激。
SELECT * FROM sysmail_log
身柱顯示
「郵件無法發送,因爲郵件服務器故障的收件人(發送使用帳戶1(2012-05-16T17郵件:05:00 。)異常消息:無法連接到郵件服務器(沒有這樣的主機是已知的))」
謝謝,我會嘗試一下... – user1141584