December 16, 2008 at 12:04 pm
I have 2 servers one works one does not....both accounts have rights to msdb.DatabaseMailUserRole.
I have added the profile and account using the same exact code(see below) one works and one gives me the following.
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 15 (2008-12-16T12:40:26). Exception Message: Cannot send mails to mail server. (Client does not have permission to submit mail to this server. The server response was: 5.7.3 Client was not authenticated.).
I am connecting to an SMTP server using SSL...both are on the same network, both are using myself as the account. I have admin right on the local machine as well as the network?
I am all out of ideas!!! please HELP
EXECUTE msdb.dbo.sysmail_add_account_sp
@account_name = 'My_SQLAccountt',
@description = 'Mail account for Database Mail',
@email_address = 'xxx@xxx.com',
@display_name = 'MyAccountt',
@username='xxx@xxx.com',
@password='xxxxxxx',
@enable_ssl = 1,
@mailserver_name = 'macd001.intermedia.net'
EXECUTE msdb.dbo.sysmail_add_profile_sp
@profile_name = 'SQL_Profilee',
@description = 'Profile used for database mail'
EXECUTE msdb.dbo.sysmail_add_profileaccount_sp
@profile_name = 'SQL_Profilee',
@account_name = 'My_SQLAccountt',
@sequence_number = 1
EXECUTE msdb.dbo.sysmail_add_principalprofile_sp
@profile_name = 'SQL_Profilee',
@principal_name = 'public',
@is_default = 1 ;
declare @body1 varchar(100)
set @body1 = 'Server :'+@@servername+ ' My First Database Email '
EXEC msdb.dbo.sp_send_dbmail @recipients='xxx@xxx.com',
@subject = 'My Mail Test',
@body = @body1,
@body_format = 'HTML' ;
THANKS
December 16, 2008 at 12:33 pm
Does your SMTP gateway have security enabled that would limit the IP's that would be able to connect and send mail?
December 16, 2008 at 1:59 pm
i had a similar issue like this few days back and there was someone else fromt hsi forum who had the issue...my guess is try changing the port no from 25 to 26..but that is just guess...it worked out for me and the other user also..thanks..
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply