Monday, February 20, 2012

Problem with DatabaseMail (SQL2K5)

Hi,
I use my gmail account to send email from outlook express. But when I try
this account from DatabaseMail, it fails with the following error:
The mail could not be sent to the recipients because of the mail server
failure. (Sending Mail using Account 15 (2007-05-01T20:46:41). Exception
Message: Could not connect to mail server. (An established connection was
aborted by the software in your host machine)
Any help would be greatly appreciated,
LeilaYou cannot use your gmail account to send database mail. You need the name of
your exchange server as database mail communicates with the exchange mail
server to send mail.
Suresh
"Leila" wrote:
> Hi,
> I use my gmail account to send email from outlook express. But when I try
> this account from DatabaseMail, it fails with the following error:
> The mail could not be sent to the recipients because of the mail server
> failure. (Sending Mail using Account 15 (2007-05-01T20:46:41). Exception
> Message: Could not connect to mail server. (An established connection was
> aborted by the software in your host machine)
> Any help would be greatly appreciated,
> Leila
>
>|||Thanks Suresh,
Do you mean DatabaseMail needs MAPI client like SQL Mail in SQL2K?
"Suresh" <Suresh@.discussions.microsoft.com> wrote in message
news:5F7C9C76-A4F7-42A9-A50A-C3CB4286E63A@.microsoft.com...
> You cannot use your gmail account to send database mail. You need the name
> of
> your exchange server as database mail communicates with the exchange mail
> server to send mail.
> Suresh
> "Leila" wrote:
>> Hi,
>> I use my gmail account to send email from outlook express. But when I try
>> this account from DatabaseMail, it fails with the following error:
>> The mail could not be sent to the recipients because of the mail server
>> failure. (Sending Mail using Account 15 (2007-05-01T20:46:41). Exception
>> Message: Could not connect to mail server. (An established connection was
>> aborted by the software in your host machine)
>> Any help would be greatly appreciated,
>> Leila
>>|||> You cannot use your gmail account to send database mail.
Yes, this is true.
> You need the name of
> your exchange server as database mail communicates with the exchange mail
> server to send mail.
No, this is not true. You can use the address of any SMTP server within
your network (or accessible from your network, but this is neither typical
nor advisable). You do not need Exchange or MAPI like you did with SQL
Mail.
A|||> I use my gmail account to send email from outlook express. But when I try
> this account from DatabaseMail, it fails with the following error:
> The mail could not be sent to the recipients because of the mail server
> failure.
You cannot use gmail. You need to set up a profile within Database Mail and
have it connect directly to an SMTP server. Typically this is a server
inside your own network, and no you don't need Exchange (e.g. you can use
the SMTP service that ships with IIS in Windows). The SMTP server of course
needs to be set up to allow relaying from the database server IP.|||Database mail needs an SMTP server, which could or could not be Exchange.
The problem you are having is related to spam-prevention. GMail is not
allowing you to use their SMTP server to send mail, otherwise, anyone could
send email out willy-nilly and spam the world. For the record, I did test
this just to confirm my statement here.
Options:
1. If you have a local Exchange server, use it as the SMTP server.
2. If your SQL Server is at a hosting provider, they should provide you with
an SMTP server.
3. If you are hosting and don't have Exchange, you can get an inexpensive or
free SMTP server, install it, and use that.
If you go with option 3, you will need to do the following:
1. Secure the hell out of it.
** Do not allow relaying, except from the machine where SQL Server
resides.
** Require authentication. If the SMTP server doesn't support
Windows Crednetials, require SSL for the "Basic Authentication".
** Do not allow anonymous authentication!!!!!
** Make sure no one can access it from the outside (get a *good*
hardware firewall from SonicWall, Zyxel, Cisco, and so on).
2. Setup Reverse-DNS for your mail server, usually done via your ISP. If you
don't, your SMTP server may get black-listed as a spam server.
Did I mention that you need to secure the hell out of the SMTP server?
--Peter
--
Peter DeBetta, MVP - SQL Server
http://sqlblog.com
--
"Leila" <Leilas@.hotpop.com> wrote in message
news:OYnNruBjHHA.4132@.TK2MSFTNGP05.phx.gbl...
> Thanks Suresh,
> Do you mean DatabaseMail needs MAPI client like SQL Mail in SQL2K?
>
> "Suresh" <Suresh@.discussions.microsoft.com> wrote in message
> news:5F7C9C76-A4F7-42A9-A50A-C3CB4286E63A@.microsoft.com...
>> You cannot use your gmail account to send database mail. You need the
>> name of
>> your exchange server as database mail communicates with the exchange mail
>> server to send mail.
>> Suresh
>> "Leila" wrote:
>> Hi,
>> I use my gmail account to send email from outlook express. But when I
>> try
>> this account from DatabaseMail, it fails with the following error:
>> The mail could not be sent to the recipients because of the mail server
>> failure. (Sending Mail using Account 15 (2007-05-01T20:46:41). Exception
>> Message: Could not connect to mail server. (An established connection
>> was
>> aborted by the software in your host machine)
>> Any help would be greatly appreciated,
>> Leila
>>
>|||Arron,
Sorry. You are right. Any SMTP server within the network can be used. I
think i used the wrong word here.
Suresh
"Aaron Bertrand [SQL Server MVP]" wrote:
> > You cannot use your gmail account to send database mail.
> Yes, this is true.
> > You need the name of
> > your exchange server as database mail communicates with the exchange mail
> > server to send mail.
> No, this is not true. You can use the address of any SMTP server within
> your network (or accessible from your network, but this is neither typical
> nor advisable). You do not need Exchange or MAPI like you did with SQL
> Mail.
> A
>
>|||Thanks everybody!
McAfee antivirus was checking port 25. I could send email via outlook but it
seemed McAfee considers DatabaseMail as kind of mass mail worm and was
protecting that! After a lot of work, I found an option which allowed the
following processes to use port 25 (in McAfee):
amgrsrvc.exe,tomcat.exe,outlook.exe,msimn.exe,agent.exe,eudora.exe,nlnotes.exe,mozilla.exe,netscp.exe,opera.exe,winpm-32.exe,pine.exe,poco.exe,thebat.exe,thunderbird.exe,ntaskldr.exe,inetinfo.exe,nsmtp.exe,nrouter.exe,tomcat5.exe,tomcat5w.exe,ebs.exe,FireSvc.exe,modulewrapper.exe,MSKSrvr.exe,MSKDetct.exe,mapisp32.exe
I disabled this protection and DatabaseMail worked! I think adding
DatabaseMail90.exe to this list will have the same result but haven't tried
yet.
"Peter W. DeBetta" <debettap@.hotmail.com> wrote in message
news:%23D5mnACjHHA.4624@.TK2MSFTNGP03.phx.gbl...
> Database mail needs an SMTP server, which could or could not be Exchange.
> The problem you are having is related to spam-prevention. GMail is not
> allowing you to use their SMTP server to send mail, otherwise, anyone
> could send email out willy-nilly and spam the world. For the record, I did
> test this just to confirm my statement here.
> Options:
> 1. If you have a local Exchange server, use it as the SMTP server.
> 2. If your SQL Server is at a hosting provider, they should provide you
> with an SMTP server.
> 3. If you are hosting and don't have Exchange, you can get an inexpensive
> or free SMTP server, install it, and use that.
> If you go with option 3, you will need to do the following:
> 1. Secure the hell out of it.
> ** Do not allow relaying, except from the machine where SQL Server
> resides.
> ** Require authentication. If the SMTP server doesn't support
> Windows Crednetials, require SSL for the "Basic Authentication".
> ** Do not allow anonymous authentication!!!!!
> ** Make sure no one can access it from the outside (get a *good*
> hardware firewall from SonicWall, Zyxel, Cisco, and so on).
> 2. Setup Reverse-DNS for your mail server, usually done via your ISP. If
> you don't, your SMTP server may get black-listed as a spam server.
> Did I mention that you need to secure the hell out of the SMTP server?
> --Peter
> --
> Peter DeBetta, MVP - SQL Server
> http://sqlblog.com
> --
> "Leila" <Leilas@.hotpop.com> wrote in message
> news:OYnNruBjHHA.4132@.TK2MSFTNGP05.phx.gbl...
>> Thanks Suresh,
>> Do you mean DatabaseMail needs MAPI client like SQL Mail in SQL2K?
>>
>> "Suresh" <Suresh@.discussions.microsoft.com> wrote in message
>> news:5F7C9C76-A4F7-42A9-A50A-C3CB4286E63A@.microsoft.com...
>> You cannot use your gmail account to send database mail. You need the
>> name of
>> your exchange server as database mail communicates with the exchange
>> mail
>> server to send mail.
>> Suresh
>> "Leila" wrote:
>> Hi,
>> I use my gmail account to send email from outlook express. But when I
>> try
>> this account from DatabaseMail, it fails with the following error:
>> The mail could not be sent to the recipients because of the mail server
>> failure. (Sending Mail using Account 15 (2007-05-01T20:46:41).
>> Exception
>> Message: Could not connect to mail server. (An established connection
>> was
>> aborted by the software in your host machine)
>> Any help would be greatly appreciated,
>> Leila
>>
>>
>

No comments:

Post a Comment