Click here to Skip to main content
15,887,875 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
Updated 16-May-12 23:16pm
v2

1 solution

The likeliest reason is that the firewall is blocking the communication. Define an exception to the firewall to allow traffic through port 587 (that seems to be the one you use).
 
Share this answer
 
Comments
GV Sharma 18-May-12 1:15am    
Hi Mika Wendelius,
Thanks for solution.
we having sql server 2008 on company local system. excually our oraganization uses proxy. so how i can block firewall from database server & other server.
Please help.

Thanks.
Wendelius 18-May-12 13:16pm    
That depends on the firewalls you use. If the Windows firewall is blocking the traffic, it can be modified via Control Panel. About other possible firewalls in your network, I'm not able to say.
GV Sharma 19-May-12 0:45am    
hi mika,
thanks.
yes you are right. its a windows firewall. our db server in local system having window seven. so now i will enable port 587, 465, 25.
mika i am new to windows firewall & network settings. there are two firewalls setting outbound firewall & inbound firewall so which one i make enable.
please help.

Thanks.

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