I want to send using sql server
Error is
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 6 (2017-09-07T14:01:30). Exception Message: Cannot send mails to mail server. (Service not available, closing transmission channel. The server response was: Cannot connect to SMTP server 204.11.56.48 (204.11.56.48:25), connect error 10060).
)
What I have tried:
EXECUTE msdb.dbo.sysmail_add_account_sp
@account_name = 'MailTest',
@description = 'Sent Mail using SQL Server',
@email_address = 'imran@execsql.org',
@display_name = 'SQL Server-Mail Send',
@username='imran@execsql.org',
@password='your_password',
@mailserver_name = 'your_email_server_name'
--delete from sysmail_account
--select * from sysmail_account
EXECUTE msdb.dbo.sysmail_add_profile_sp
@profile_name = 'MailTest',
@description = 'Profile used to send mail'
--select * from sysmail_profile
EXECUTE msdb.dbo.sysmail_add_profileaccount_sp
@profile_name = 'MailTest',
@account_name = 'MailTest',
@sequence_number = 1
--select * from sysmail_profileaccount
EXECUTE msdb.dbo.sysmail_add_principalprofile_sp
@profile_name = 'MailTest',
@principal_name = 'public',
@is_default = 1 ;
exec msdb.dbo.sp_send_dbmail
@profile_name = 'MailTest',
@recipients = 'paulvinayak70@gmail.com',
@subject = 'Mail Test',
@body = 'Mail Sent Successfully',
@body_format = 'text'
but it gives error
when I execute view
select * from sysmail_allitems
at column send_status it gives values as Failed
and description of error is as
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 4 (2017-09-07T12:17:46). Exception Message: Cannot send mails to mail server. (Service not available, closing transmission channel. The server response was: Cannot connect to SMTP server 204.11.56.48 (204.11.56.48:25), connect error 10060).
)