Click here to Skip to main content
16,018,973 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everyone.
i am sending email from sql server 2008 r2.

database mail configuration details set as :
--------------------------------------------------------------
Server Name : smtp.gmail.com
Port No : 587
Set Basic Authentication : User Name, Password

i tried more but email sending is failed and error occur is-:

The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 2 (2012-05-03T15:46:30). Exception Message: Could not connect to mail server. (An attempt was made to access a socket in a way forbidden by its access permissions 173.194.79.108:587). )


Thanks and Regards:
Ganpat Sharma
Posted

1 solution

It can be because of various reasons. You need to look at them one by one.

Is the port open? Firewall permissions in place?
Further make sure you have configured database to send emails. Look here:
SQL SERVER – 2008 – Configure Database Mail – Send Email From SQL Database[^]
CP: SQL SERVER - 2008 - Configure Database Mail - Send Email From SQL Database[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900