January 26, 2014 at 12:08 pm
I am trying to set up DatabaseMail on 2012 (running on Win7 if it matters) per Lowell's instructions, which are here:
http://www.sqlservercentral.com/Forums/Topic1522970-391-1.aspx
I followed the instructions, but when I try to send a test message, it gets queued, but doesn't send. Here's the error message:
01/25/2014 23:35:30,,Error,22,The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 6 (2014-01-25T23:35:30). 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.7.0 Must issue a STARTTLS command first. m9sm20581397yha.2 - gsmtp).<nl/>),3720,5,,1/25/2014 11:35:30 PM,sa
Here's the setup script I used for database mail... maybe I set it up wrong...?
-- No lie, I copied this from Jonathan Kehayais... but it doesn't work with GMail...
EXEC sys.sp_configure N'Database Mail XPs', N'1'
GO
RECONFIGURE
GO
EXECUTE msdb.dbo.sysmail_add_profile_sp
@profile_name=N'Gmail Notification Account',
@description=N'Email Notifications from SQL Server using Gmail Account'
GO
EXECUTE msdb.dbo.sysmail_add_principalprofile_sp
@principal_name=N'guest',
@profile_name=N'Gmail Notification Account',
@is_default=1
GO
EXECUTE msdb.dbo.sysmail_add_profileaccount_sp
@sequence_number=1,
@profile_name=N'Gmail Notification Account',
@account_name=N'Gmail Notifications'
GO
EXECUTE msdb.dbo.sysmail_add_account_sp
@account_name='SQLNotificationAccount',
@email_address='XXXXXXX@gmail.com',
@display_name='SQL Server Gmail Notifications',
@replyto_address='XXXXXXX@gmail.com',
@description='Email Address for sending Notifications using Gmail (scripted)',
@mailserver_name='smtp.gmail.com',
@mailserver_type='SMTP',
@port=587,
@username='XXXXXXX@gmail.com',
@password='PASSWORD',
@use_default_credentials=0,
@enable_ssl=1
But to no avail. Queues fine, but never sends. :crazy:
Any ideas what I did wrong? (Yes, the username and password stuff is munged...)
January 27, 2014 at 2:37 am
Make sure two-factor authentication is not enabled:
http://support.google.com/accounts/bin/answer.py?hl=en&answer=185833
-- Gianluca Sartori
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply