June 7, 2016 at 11:58 am
Hi
how can i install and configure smtp server/services.
i installed only sql server 2012 software.
am i need to install windows server 2012.
can any one suggest me.
June 7, 2016 at 8:18 pm
SMTP servers are separate software. This isn't included with SQL Server. Your Exchange or other mail server can function as an SMTP server.
June 7, 2016 at 10:14 pm
what want to achive, you want to install SMTP server ? or SQL server.
or you want to use your smtp server to send out email from sql server ??
June 9, 2016 at 1:11 am
Hi
yes i want to use smtp server to send out email from sql server ??
June 9, 2016 at 2:05 am
The basic code to do this is:
USE master;
EXEC sp_configure 'Database Mail XPs', 1;
RECONFIGURE WITH OVERRIDE;
--Create a new mail profile
USE msdb;
EXEC msdb.dbo.sysmail_add_profile_sp @profile_name = '<<profilename>>',
@description = '<<profiledescription>>';
EXEC msdb.dbo.sysmail_add_account_sp @account_name = '<<accountname>>',
@description = '<<accountdescription>>',
@email_address = '<<accountemailaddress>>',
@display_name = '<<accountdisplayname>>',
@replyto_address = '<<replytoaddress>>',
@mailserver_name = '<<smtpservername>>', @username = '<<smtpusername>>',
@password = '<<smtppassword>>', @port = 25;
-- assuming default
EXEC msdb.dbo.sysmail_add_profileaccount_sp @profile_name = '<<profilename>>',
@account_name = '<<accountname>>', @sequence_number = 1;
You might then want to associate the profile with the SQL Agent so you can set it up for notifications:
EXEC msdb.dbo.sp_set_sqlagent_properties @databasemail_profile = '<<profilename>>';
EXEC msdb.dbo.sp_add_operator @name = '<<OperatorName>>', @enabled = 1,
@pager_days = 0, @email_address = '<<operatoremailaddress>>';
You might then want to set this as your failsafe email operator for Agent:
USE [msdb];
EXEC master.dbo.sp_MSsetalertinfo @failsafeoperator=N'<<operatorname>>', @notificationmethod=1;
USE [msdb];
EXEC msdb.dbo.sp_set_sqlagent_properties @email_save_in_sent_folder=1, @databasemail_profile=N'<<profilename>>', @use_databasemail=1;
If you do all that, then there's no excuse for not setting up the appropriate email alerts too...
Thomas Rushton
blog: https://thelonedba.wordpress.com
June 9, 2016 at 10:37 am
Hi
i tried this but its giving the error like this
Msg 15123, Level 16, State 1, Procedure sp_configure, Line 62
The configuration option 'Database Mail XPs' does not exist, or it may be an advanced option.
June 9, 2016 at 2:35 pm
First, is this SQL Server 2012?
Second, this might help you get started: http://www.sqlservercentral.com/articles/Stairway+Series/72455/
June 10, 2016 at 12:40 am
you need to run the following in order to see the advanced options
EXEC sp_configure 'Show Advanced Options',1
RECONFIGURE
June 10, 2016 at 4:07 am
Hi
yes it is the sql server 2012.
i have done all the things still mail is not sending the status is failed its saying.
i uploaded the screen... please suggest the solution
June 10, 2016 at 4:40 am
naveenareddy.dba (6/10/2016)
Hiyes it is the sql server 2012.
i have done all the things still mail is not sending the status is failed its saying.
i uploaded the screen... please suggest the solution
Your screenshot is not visible to me (the page won't load). Could you describe the problem you're having?
And did you restart SQL Server Agent Service after enabling Database Mail?
June 10, 2016 at 4:47 am
naveenareddy.dba (6/9/2016)
Hii tried this but its giving the error like this
Msg 15123, Level 16, State 1, Procedure sp_configure, Line 62
The configuration option 'Database Mail XPs' does not exist, or it may be an advanced option.
See below:
subramanian.esakkimuthu 40485 (6/10/2016)
you need to run the following in order to see the advanced optionsEXEC sp_configure 'Show Advanced Options',1
RECONFIGURE
And if that doesn't work, change the code to:
sp_configure 'show advanced options', '1';
RECONFIGURE WITH OVERRIDE;
GO
Then run this again:
USE master;
EXEC sp_configure 'Database Mail XPs', 1;
RECONFIGURE;
Double check your profiles are set up and that an account is set up using your default profile. Then restart the SQL Server Agent Service.
June 10, 2016 at 9:40 am
You uploaded a Word backup file, which isn't valid. It would be better to send an image screenshot, or post it elsewhere and link here.
Brandie has given you some things to check. Make sure your credentials for SMTP are valid . You can add another mail profile in Outlook or your mail client to check them.
June 11, 2016 at 5:25 am
we cannot see the attach document , so attached the screen shot
June 11, 2016 at 11:41 am
hi
i am getting the error like this
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1007 (2016-06-11T23:01:39). 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. Learn more at).
June 11, 2016 at 11:45 am
hi
i have entered all the valid details,
enabled service broker,enabled mail in agent server and restarted,i have made Database Mail XPs run value 1,
smtp server:smtp.gmail.com
port:587
when ever i sent the test mail. then i am getting the error like this
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1007 (2016-06-11T23:01:39). 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. Learn more at).
shall any one help me to solve this issue please.
Viewing 15 posts - 1 through 15 (of 21 total)
You must be logged in to reply to this topic. Login to reply