all groups > sql server dts > april 2005 >
You're in the

sql server dts

group:

SMTP in my database server


SMTP in my database server Ray5531
4/29/2005 2:11:06 PM
sql server dts:
I basically need to send emails from MY DTS packages and also some of my
stored procedures.There is no way of having any MAPI compliant software
installed on the productions database server,so I came up with the idea of
installing an SMTP server and use the extended stored procedure introduced
here(http://www.sqldev.net/xp/xpsmtp.htm). Now my database admin is nagging
that I don't like to have something running in the SQL SERVER address space
and my network admin is nagging that he dosen't want to have SMTP server
installed on the production,because Microsoft dosen't recommand this. I just
wondered whay you guys have ever done in terms of sending emails from your
sql server.Is there a way of sending emails from sql server using another
SMTP server on another box(same domain thought)?

Re: SMTP in my database server Narayana Vyas Kondreddi
4/30/2005 12:00:00 AM
Yes of course. SMTP service need not be installed on the SQL Server. In my
case, I have different mailing server, with SMTP on it. And I specify the
SMTP server name as a parameter to the xp_smtp_sendmail stored procedure.
--
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @ http://vyaskn.tripod.com/


[quoted text, click to view]

Re: SMTP in my database server Ray5531
5/1/2005 11:16:46 AM
Is there a firewall between your sql server and your mailing servers ? If
yes how come xp_smtp_sendmail opens up a TCP/IP socket to the mailing
server? In my case there is a firewall between my database serevr and also
external SMTP servers...

Thanks for your help,I'm so stuck to this problem.

Bye
[quoted text, click to view]

Re: SMTP in my database server Gert E.R. Drapers
5/2/2005 12:00:00 AM
The equivalent to XPSMTP is available for DTS 2000 as a DTS Custom Task,
see:
http://sqldev.net/dts/SMTPTask.htm

GertD@SQLDev.Net

Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright © SQLDev.Net 1991-2005 All rights reserved.

[quoted text, click to view]

Re: SMTP in my database server Gert E.R. Drapers
5/2/2005 12:00:00 AM
You would have to open port 25 (or if you use an other port which ever you
are using) for traffic from SQL to the SMTP server. You can also look at an
SMTP relay server solution.

GertD@SQLDev.Net

Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright © SQLDev.Net 1991-2005 All rights reserved.

[quoted text, click to view]

Re: SMTP in my database server Ray5531
5/2/2005 5:38:42 PM
Is that relay server for free?
Where should I get it from?

Thanks fro your reply.

[quoted text, click to view]

Re: SMTP in my database server Gert E.R. Drapers
5/3/2005 12:00:00 AM
There are free relay server, see
http://www.google.com/search?sourceid=navclient&ie=UTF-8&rls=GGLD,GGLD:2004-25,GGLD:en&q=SMTP+relay+server

GertD@SQLDev.Net

Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright © SQLDev.Net 1991-2005 All rights reserved.

[quoted text, click to view]

Re: SMTP in my database server Ray5531
5/3/2005 6:27:51 PM
Thanks Gert,
It really helped.


[quoted text, click to view]

Re: SMTP in my database server Perry Provost
5/7/2005 8:55:17 PM
One thing about the SMTPTask is that it expires as of June 2005. It is
mentioned at the very bottom of page. I don't know if that means it stops
working, or what.

[quoted text, click to view]
Re: SMTP in my database server Jim Vierra
5/8/2005 2:38:04 AM
Here is a script that can be added to DTS to send mail. It is what the =
below EXE is made out of but with a COM wrapper.

Stay tuned and I will build a COM wrapper for it or you can use it as =
is. You can easily modify it to meet our needs in DTS. CDO is =
installed on all Windows systems from 2000 on.


function SendMail(strTo, strFrom, strSubject,strText,strSMTPServer) 'As =
Boolean
On Error Resume Next
SendMail =3D True
Set objEmail =3D CreateObject("CDO.Message")
If Err =3D 0 Then
objEmail.From =3D strFrom=20
objEmail.To =3D strTo=20
objEmail.Subject =3D strSubject
objEmail.Textbody =3D strText
=
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/conf=
iguration/sendusing") =3D 2
=
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/conf=
iguration/smtpserver") =3D strSMTPServer
=
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/conf=
iguration/smtpserverport") =3D 25
objEmail.Configuration.Fields.Update
objEmail.Send
If Err <> 0 Then
SendMail =3D False
End If
End If
End Function

--=20
Jim Vierra

"Perry Provost" <Perry Provost@discussions.microsoft.com> wrote in =
message news:A13EFC31-BA76-42FE-A9A5-91773E73A42F@microsoft.com...
[quoted text, click to view]
Re: SMTP in my database server Ray5531
5/9/2005 9:40:42 AM
Jim,Thanks alot=20

It helps a lot .
[quoted text, click to view]
Here is a script that can be added to DTS to send mail. It is what =
the below EXE is made out of but with a COM wrapper.

Stay tuned and I will build a COM wrapper for it or you can use it as =
is. You can easily modify it to meet our needs in DTS. CDO is =
installed on all Windows systems from 2000 on.


function SendMail(strTo, strFrom, strSubject,strText,strSMTPServer) =
'As Boolean
On Error Resume Next
SendMail =3D True
Set objEmail =3D CreateObject("CDO.Message")
If Err =3D 0 Then
objEmail.From =3D strFrom=20
objEmail.To =3D strTo=20
objEmail.Subject =3D strSubject
objEmail.Textbody =3D strText
=
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/conf=
iguration/sendusing") =3D 2
=
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/conf=
iguration/smtpserver") =3D strSMTPServer
=
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/conf=
iguration/smtpserverport") =3D 25
objEmail.Configuration.Fields.Update
objEmail.Send
If Err <> 0 Then
SendMail =3D False
End If
End If
End Function

--=20
Jim Vierra

"Perry Provost" <Perry Provost@discussions.microsoft.com> wrote in =
message news:A13EFC31-BA76-42FE-A9A5-91773E73A42F@microsoft.com...
[quoted text, click to view]
AddThis Social Bookmark Button