Mail server failure. connection refused. too manay connections - when using sp_send_dbmail with job agent
Hello All,
I've a weird problem when I'm using "SP_Send_dbmail" to send a simple e-mail to two recipients using job agent.
The code i write is:
exec msdb.dbo.sp_send_dbmail
@profile_name= 'Send Reports',
@recipients = '[email protected] ; [email protected]',
@Copy_recipients = '[email protected]',
@Body = 'Whatever will be here',
@subject = 'Daily Reports',
@file_attachments = 'd:\MyFolder\MyFile.txt';
The error i receive is:
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2015-03-03T14:57:17). Exception Message: Cannot send mails to mail server. (Service not available, closing transmission channel. The server response
was: service not available (connection refused, too many connections)).
Does any one know why i get such error???
Please advise.
Hany Mounir
Hello,
Please consider any Windows Firewall, security hardware/software, policies on your organization’s mail
server.
Hope this helps.
Regards,
Alberto Morillo
SQLCoffee.com
Similar Messages
-
SMTP connection refused too many connections
I keep getting the above error on my email.
I'm using blue iris to send me emails using my bt account and over the last month I'm am getting more and more SMTP failed to connect, when is look at the logs on blue iris it says connection refused too many active connections.
Can anyone tell me if BT has a limit on the number of active connections to my btinternet.com email?Hi ChrisBRRS,
Welcome and thanks for posting.
I'm sorry for the problems you're having. I've moved your post here where it's more relevant and others should be along now to offer further advice
All the best,
Robbie
BTCare Community Mod
If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
We are sorry that we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)
If someone answers your question correctly please let other members know by clicking on ’Mark as Accepted Solution’. -
The mail could not be sent to the recipients because of the mail server failure.
Hi,
I am configured Database Mail,But i am getting below error while i am sending Test mail.
Message
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 4 (2014-03-10T15:54:11). 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.7.1 Client was not authenticated).
Pls help me,
Thanks - SelvaKumarSubramaniam.Please MARK AS ANSWER, if my answer is useful to U.Hi Selvaons,
I would suggest you contact your mail administrator for assistance. Here are some good articles regarding how to configure database mail in SQL Server for your reference, please see:
http://blog.sqlauthority.com/2008/08/23/sql-server-2008-configure-database-mail-send-email-from-sql-database/
http://www.codeproject.com/Articles/29060/SQL-SERVER-Configure-Database-Mail-Send-Email
http://www.sqlservercentral.com/blogs/databaseexpertisecom/2010/05/12/database-mail-set-up-in-sql-server-2008/
Regards,
Elvis Long
TechNet Community Support -
I Cannot use Safari to access my bookmarks, I get a server failure message. The same is happening with my email. I get a message cannot get mail, server failure. How do I fix the problem?
It might be worth a shot to reset your router first. Unplug it from power for about 30 seconds and then plug it in again. Or try any other WiFi network and see what happens.
-
Interesting db mail issue. If i click send test mail from sql mgmt studio, it works fine, but when i execute a SP to send a mail, it fails. One thing I noticed is that the "LastModified" column in the mail log shows the domain account when a test
mail was sent from mgmt studio, but show "sa" when the SP was used to send mail.
This is from SQL 2012, did not see this in sql 2008, looks like 2008 always used the service account. any ideas ?
Get this error:
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2013-04-30T16:36:52). Exception Message: Cannot send mails to mail server. (Mailbox unavailable. The server response was: 5.7.1 Client does not
Thanks.
RangaHi Ranga,
I also use SQL Server 2012. I send a test email through SQL Server Management and the last modified By “sa”.
If you used stored procedure to send a test email. Please use the command below:
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'Adventure Works Administrator',
@recipients = '[email protected]',
@body = 'The stored procedure finished successfully.',
@subject = 'Automated Success Message' ;
I can both send test email through SQL Server Management Studio and SP. Make sure you have the right profile. Since you could send test mail via SQL Server Management Studio, please try again to send it via SP.
Thanks.
If you have any feedback on our support, please click
here.
Maggie Luo
TechNet Community Support -
When using iPhone with Ford Automobiles' SYNC, the connection drops each time the ignition is shut off. To restore, you must turn off the bluetooth on iPhone, then restart each time. Any suggestions?
There is an update avaialbe for Ford systems to correct bluetooth problems. You need to update your system.
-
Can't connect to skype, get invalid port, using laptop with iphone as router
can't connect to skype, get invalid port, using laptop with iphone as router
can't connect to skype, get invalid port, using laptop with iphone as router
-
My outgoing mail server smtp remains offline. I have tried using different port but did not work. What else can I try?
OS X Mail: Troubleshooting sending and receiving email messages
-
Only 274 mails are coming when using pop3 with java mail
Only 274 mails are coming from GMAIL when using pop3 with java mail. but there are more than 3000 mails.
I'm not getting the reason, code is given below:
public static void main(String[] args) {
// SUBSTITUTE YOUR ISP's POP3 SERVER HERE!!!
// String host = "pop.bizmail.yahoo.com";
// final String user = "[email protected]";
// final String password = "xxx";
String host = "pop.gmail.com";
final String user = "gauravjlj";
final String password = "xxx";
String subjectSubstringToSearch = "Test E-Mail through Java";
try {
Properties prop = new Properties();
prop.setProperty("mail.pop3.socketFactory.class",
"javax.net.ssl.SSLSocketFactory");
prop.setProperty("mail.pop3.socketFactory.fallback", "false");
prop.setProperty("mail.pop3.port", "995");
prop.setProperty("mail.pop3.socketFactory.port", "995");
prop.put("mail.pop3.host", host);
prop.put("mail.store.protocol", "pop3");
Session session = Session.getDefaultInstance(prop);
Store store = session.getStore();
System.out.println("your ID is : "+ user);
System.out.println("Connecting...");
store.connect(host, user, password);
System.out.println("Connected...");
// Get "INBOX"
Folder fldr = store.getFolder("INBOX");
fldr.open(Folder.READ_ONLY);
int count = fldr.getMessageCount();
System.out.println(count + " total messages");
// Message numebers start at 1
for(int i = 1; i <= count; i++) {
// Get a message by its sequence number
Message m = fldr.getMessage(i);
// Get some headers
Date date = m.getSentDate();
Address [] from = m.getFrom();
String subj = m.getSubject();
String mimeType = m.getContentType();
System.out.println(date + "\t" + from[0] + "\t" +
subj + "\t" + mimeType);
// Search for e-mails by some subject substring
String pattern = subjectSubstringToSearch;
SubjectTerm st = new SubjectTerm(pattern);
// Get some message references
Message [] found = fldr.search(st);
System.out.println(found.length +
" messages matched Subject pattern \"" +
pattern + "\"");
for (int i = 0; i < found.length; i++) {
Message m = found;
// Get some headers
Date date = m.getSentDate();
Address [] from = m.getFrom();
String subj = m.getSubject();
String mimeType = m.getContentType();
System.out.println(date + "\t" + from[0] + "\t" +
subj + "\t" + mimeType);
Object o = m.getContent();
if (o instanceof String) {
System.out.println("**This is a String Message**");
System.out.println((String)o);
else if (o instanceof Multipart) {
System.out.print("**This is a Multipart Message. ");
Multipart mp = (Multipart)o;
int count3 = mp.getCount();
System.out.println("It has " + count3 +
" BodyParts in it**");
for (int j = 0; j < count3; j++) {
// Part are numbered starting at 0
BodyPart b = mp.getBodyPart(j);
String mimeType2 = b.getContentType();
System.out.println( "BodyPart " + (j + 1) +
" is of MimeType " + mimeType);
Object o2 = b.getContent();
if (o2 instanceof String) {
System.out.println("**This is a String BodyPart**");
System.out.println((String)o2);
else if (o2 instanceof Multipart) {
System.out.print(
"**This BodyPart is a nested Multipart. ");
Multipart mp2 = (Multipart)o2;
int count2 = mp2.getCount();
System.out.println("It has " + count2 +
"further BodyParts in it**");
else if (o2 instanceof InputStream) {
System.out.println(
"**This is an InputStream BodyPart**");
} //End of for
else if (o instanceof InputStream) {
System.out.println("**This is an InputStream message**");
InputStream is = (InputStream)o;
// Assumes character content (not binary images)
int c;
while ((c = is.read()) != -1) {
System.out.write(c);
// Uncomment to set "delete" flag on the message
//m.setFlag(Flags.Flag.DELETED,true);
} //End of for
// "true" actually deletes flagged messages from folder
fldr.close(true);
store.close();
catch (MessagingException mex) {
// Prints all nested (chained) exceptions as well
mex.printStackTrace();
catch (IOException ioex) {
ioex.printStackTrace();
Please tell me.
ThanksIs it possible that GMail only allows access to untagged emails via POP3? Or only to emails from the last x days?
POP3 is the older email retrieval protocol (IMAP4 is the more current one) and only has very limited support for folders (or anything but a single inbox, really). It's quite common that POP3 only allows access to a subset of all emails stored by a provider. -
Best practice when using Tangosol with an app server
Hi,
I'm wondering what is the best practice when using Tangosol with an app server (Websphere 6.1 in this case). I've been able to set it up using the resource adapter, tried using distributed transactions and it appears to work as expected - I've also been able to see cache data from another app server instance.
However, it appears that cache data vanishes after a while. I've not yet been able to put my finger on when, but garbage collection is a possibility I've come to suspect.
Data in the cache survives the removal of the EJB, but somewhere later down the line it appear to vanish. I'm not aware of any expiry settings for the cache that would explain this (to the best of my understanding the default is "no expiry"), so GC came to mind. Would this be the explanation?
If that would be the explanation, what would be a better way to keep the cache from being subject to GC - to have a "startup class" in the app server that holds on to the cache object, or would there be other ways? Currently the EJB calls getCacheAdapter, so I guess Bad Things may happen when the EJB is removed...
Best regards,
/PerHi Gene,
I found the configuration file embedded in coherence.jar. Am I supposed to replace it and re-package coherence.jar?
If I put it elsewhere (in the "classpath") - is there a way I can be sure that it has been found by Coherence (like a message in the standard output stream)? My experience with Websphere is that "classpath" is a rather ...vague concept, we use the J2CA adapter which most probably has a different class loader than the EAR that contains the EJB, and I would rather avoid to do a lot of trial/error corrections to a file just to find that it's not actually been used.
Anyway, at this stage my tests are still focused on distributed transactions/2PC/commit/rollback/recovery, and we're nowhere near 10,000 objects. As a matter of fact, we haven't had more than 1024 objects in these app servers. In the typical scenario where I've seen objects "fade away", there has been only one or two objects in the test data. And they both disappear...
Still confused,
/Per -
I'm unable to connect to my yahoo e-mail on my IPAD2 since I have installed the new software? I can use safari and navagiate to my yahoo e-mail and get e-mail. I'm also unable to connect to the Icloud. Does anyone know what I may be doing wrong and how to fix it.
What does it have to do in iPad forum?
-
Connection refused to host: connection timed out
I have been struggling with this problem a couple of days now so I really hope someone can help me. I am trying to get rmi to work in a NAT environment. We use a firewall, so I have opened port 1099 and 2020 which I use as a fixed port for communication (just to be sure it is not a firewall thing); I use the following code:
//server
public class ComputeEngine extends UnicastRemoteObject
implements Compute
public ComputeEngine() throws RemoteException {
super();
public String getMessage() {
return "you have successfully connected to the server";
public static void main(String[] args) {
if (System.getSecurityManager() == null) {
System.setSecurityManager(new RMISecurityManager());
try {
String port = args[0];
try {
RMISocketFactory.setSocketFactory(new FixedPortRMISocketFactory(Integer.parseInt(port)));
} catch (IOException e) {
e.printStackTrace();
LocateRegistry.createRegistry( 1099 );
catch (RemoteException e1) {
e1.printStackTrace();
String name = "rmi://localhost/Compute";
try {
Compute engine = new ComputeEngine();
Naming.rebind(name, engine);
System.out.println("ComputeEngine bound");
while(true); //stay alive
} catch (Exception e) {
System.err.println("ComputeEngine exception: " + e.getMessage());
e.printStackTrace();
public Socket createSocket(String host, int port)
throws IOException {
System.out.println("creating socket to host : " + host + " on port " + port);
return new Socket(host, port);
* Create a server socket on the specified port (port 0 indicates
* an anonymous port) and writes out some debugging info
* @param port the port number
* @return the server socket on the specified port
* @exception IOException if an I/O error occurs during server socket
* creation
* @since JDK1.1
public ServerSocket createServerSocket(int port)
throws IOException {
port = (port == 0 ? portnumber : port);
System.out.println("creating ServerSocket on port " + port);
return new ServerSocket(port);
//client
public class ComputePi {
public static void main(String args[]) {
if (System.getSecurityManager() == null) {
System.setSecurityManager(new RMISecurityManager());
try {
String name = "rmi://" + args[0] + "/Compute";
Compute comp = (Compute) Naming.lookup(name);
System.out.println("connected to server");
System.out.println(comp.getMessage());
} catch (Exception e) {
System.err.println("ComputePi exception: " + e.getMessage());
e.printStackTrace();
I start the client with:
java -Djava.security.policy=policy.all -jar client.jar 194.2.4.6:1099
I start the server with:
java -Djava.rmi.server.codebase="file:/C:\RMI\\server.jar" -Djava.rmi.server.hostname="194.2.4.6" -Djava.security.policy=policy.all -jar server.jar 2020
As you can see I set the "-Djava.rmi.server.hostname" property which should be a solution to the NAT problem. However I keep getting the following exception!!??!!:
ComputePi exception: Connection refused to host: 194.2.4.6; nested exception is:
java.net.ConnectException: Connection timed out: connect
java.rmi.ConnectException: Connection refused to host: 194.2.4.6; nested exception is:
java.net.ConnectException: Connection timed out: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.newCall(Unknown Source)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Unknown Source)
at client.ComputePi.main(ComputePi.java:14)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
... 7 more
Can anyone help me with this, please??????
kind regards,
ChristiaanYes, i can ping it from the client.
I have also noticed that when i run my server with the option -Djava.rmi.server.hostname=IP the applications stops automatically after a few minuts...
I'm not using nothing about codebase. I have the stub and skel classes in server and client machines..
I add the complete exception:
Client exception: java.rmi.ConnectException: Connection refused to host: external_IP; nested exception is:
java.net.ConnectException: Connection timed out: connect
java.rmi.ConnectException: Connection refused to host: external_IP; nested exception is:
java.net.ConnectException: Connection timed out: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:567)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:101)
at example.hello.Server_Stub.sayHello(Unknown Source)
at example.hello.Client.main(Client.java:55)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:426)
at java.net.Socket.connect(Socket.java:376)
at java.net.Socket.<init>(Socket.java:291)
at java.net.Socket.<init>(Socket.java:119)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirect
SocketFactory.java:22)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMaster
SocketFactory.java:128)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:562)
... 5 more -
Connection Refused Error In Connection Client
Hello Geeks
I am runnig a RMI application in which runs on internet , i have setup RMI server on a host server and it is running there.
Now, when i try to call client using ip address of the Host , i am getting Connection Refused error.
Example :
Registry registry=LocateRegistry.getRegistry("70.33.246.110");
System.out.println("Above connectMe");
String serverName = "rmi://70.33.246.110:2786/connectUser";
connectMe stub=(connectMe)Naming.lookup(serverName);
System.out.println("Below connectMe");
boolean log=stub.login(username,password,1);
System.out.println("Below login");Here "connectuser" is name i have given in server to which client lookups.I am getting -> Above connectMe and Below connectMe
but then i am getting connection refused error.
Please Help Me Out.....ASAp
Edited by: Hardik.Mishra on Oct 3, 2009 5:46 PMRegistry registry=LocateRegistry.getRegistry("70.33.246.110");There's no point to doing that ...
System.out.println("Above connectMe");
String serverName = "rmi://70.33.246.110:2786/connectUser";
connectMe stub=(connectMe)Naming.lookup(serverName);... if you're doing that. The getRegistry() doesn't do a network operation, it just constructs a stub to that Registry locally. Only by using it would you find out whether it meant anything: and you're not using it.
I am getting -> Above connectMe and Below connectMe
but then i am getting connection refused error.See item A.1 on the RMI Frequently Asked Questions list in the Javadoc. -
Connection refused error while connecting to port.
Hello,
I have a service (Connect Direct) listening at port 1364 in server X.
$ netstat -an | grep 1364
11.22.33.44.1364 *.* 0 0 0 0 LISTEN
(Assume 11.22.33.44 = Server X's IP.)
Now, when another server (say Y) tries to use this service in server X, it is getting "Connection Refused" error. I tried telneting.
From Y:
telnet 11.22.33.44 23 is working
telnet 11.22.33.44 1364 is giving the same Connection Refused error.
telnet 11.22.33.44 1364
Trying 11.22.33.44...
telnet: Unable to connect to remote host: Connection refused
/usr/sbin/ping 11.22.33.44
11.22.33.44 is alive
To complicate things, 11.22.33.44 is not the original IP of server X.
ifconfig -a gives:
hme0: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST> mtu 1500
inet 11.22.33.55 netmask ffffff00 broadcast 11.22.33.255
hme0:1: flags=843<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 11.22.33.44 netmask ffffff00 broadcast 11.22.33.255
(in additional to a couple of other IPs).
What could be the problem?
Help!!!!IPF firewalling could cause this, if you have it enabled.
I havent used it, so I'm not entirely sure how to check.
Of another firewall if its between the 2 machines. Are they on the same subnet? -
As of sometime after September 10, 2012, at 4:40PM, I have not been receiving any mail. Not on my iPhone, iPad, iMac, or MacBookPro. The trouble shooting help on Apple's web site is designed to help ensure my devise settings are accurate. However, I moved from .Mac to .me and now to .cloud and have operating with no issues for several months on the iCloud.
How can I check to see if my mail problem is really Apple's fault rather than double checking all my devise settings ad nausiam? I feel there is a server issue with Apple because none of my devises can receive mail, however, I do not know how to validate my theory with Apple. I get an error message telling me:
Cannot Get Mail
The connection to the server failed.
Apple says there is a mail server problem affecting 1% of users. However, am I one of the 1%? If I assume I am, wait for the problem to be fixed, and then learn I was not one of the 1% and continue to have mail issues, then I will be more frustrated.I have the same problem since yesterday morning. I checked the systems status and still the same. I guess we are the 1.1% who has problem with their email.
Maybe you are looking for
-
Hi Experts, I have got query to see daily cheque payment history which only related prior date's invoice from today. However, I am stuck to get right result when there are multiple seperate payment history for same customer. I appreciate for any help
-
Transfer of data from one page to another
Hi all, I am new in bsp. I have created one bsp application in which i have created one tableview iterator with button in one of its column. when i click on the button i am calling one page ,in which on initialization event, i have written one co
-
I ab in Muse. How do I fix error message, This document contains a link to an asset being upsampled. You should resize it smaller or right-mouse click on the asset in the Assets panel to see additional options.
-
Hi all I am doing a scenario on PI7.1 in which we are using BPM. In BPM we have several send and transformation steps. On one transfornatiion step our BPM fails and terminate with error. Though I took data from sxmb_moni and test the mapping in des
-
Switching from Mac to PC with CS6
Last year, I purchased Adobe CS6 Education Edition for a mac. I just switched to a PC because my Mac broke, and am now wondering if I have to buy an entire new version for my PC. I have the registration information and Adobe CDs. Please let me know w