Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Send email via URL....AT ROPE END!!

Author  Topic 

sschwarze
Starting Member

15 Posts

Posted - 2003-10-02 : 16:17:44
I have a hosting compnay. I have sql 2000 with them.
They do not allow you to use Extended store procedures(sp_create).
They do not have smtp installed on the sql server.
They will not install a dll.

I want to send email on event happens or in a dts or anything. I am looking for help. The only solutions I have come across is useing a webservice that they send email for you. You HTTP get mothod:
www.webservicex.net/sendemail.asmx/sendemails?ToEmailAddress=test@anywho.com&FromEmailAddress=Scott@whatever.com&Subject=test&Body=Testmessage

Just paste this in a browser hit go and your done! Mail Sent! Is there any way to do this in sql server. I was look for a method to do this in an activex script in a DTS package. But at this point anything will do.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-10-02 : 16:20:27
I believe you can use the same method in SQL Server if you've got IIS installed on the same server. This is not a recommended approach though.

Tara
Go to Top of Page

sschwarze
Starting Member

15 Posts

Posted - 2003-10-02 : 16:21:58
IIS is not installed on the same server
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-10-02 : 16:30:35
You are out of options.

Tara
Go to Top of Page

sschwarze
Starting Member

15 Posts

Posted - 2003-10-02 : 16:33:08
SQLTEAM is the best. If you guys can't figure it out no one can!

PS. Thinking of some VBScript or JScript code. Something
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2003-10-02 : 19:37:43
Maybe another host that is more accommodating to your needs? It's not like there's only one out there.

Well, there is actually, and they are named

ORCSWeb
Go to Top of Page

sschwarze
Starting Member

15 Posts

Posted - 2003-10-03 : 07:59:10
Yea I know that is the answer if you have money to BURN! NOT! Looks like you have a nice setup. But the hosting company I am useing is $10.33 a month(500bm web and 50mb SQL) and offers the features listed below. I know it is NOT the best around or the cheapest. But they offer the features and the price that I can live with. So far this is the only thing that has got me down.

500MB Web Space
Free New Domain Registration
Unmetered Data Transfer
Unlimited Email
Unlimited Email Aliases
Unlimited Autoresponders
Web-Based Email
Toll-Free Technical Support
24 Hour FTP Access
99.9% Uptime Guarantee
30 Day Money-Back Guarantee
ASP Support
Live Statistics
FrontPage 2000 Extensions
Cold Fusion 4.5
Database Access
CGI/Perl
ASP Mail Component
ASPEmail Component
DevMailer Component
Instant Setup!
Password Protected Directories
Daily Backups
Custom 404 Error Page
Server Side Includes (.stm, .shtm, .shtml)
RealAudio/Video
PHP Server Extensions
SSL Security
E-commerce Shopping Cart by Cart32.com
Control Panel
SQL Server 2000 - ($25/Year Per Database)
ASP Simple Upload Component
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2003-10-03 : 08:16:33
Ummmm....

ASP Mail Component
ASPEmail Component
DevMailer Component

If you want to send email, they seem to accommodate you.
Go to Top of Page

sschwarze
Starting Member

15 Posts

Posted - 2003-10-03 : 08:22:30
OK explain. That is all asp side right? I need to send mail from SQL Server in dts or sp. Can use them right?
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2003-10-03 : 18:50:11
Yes, look in Books Online under "sp_OACreate" and the other sp_OA system procedures. You'd use these if you want to do it from T-SQL. And you can always put them into an ActiveX task in DTS or an ActiveX job step and avoid T-SQL entirely.

You say they don't have SMTP installed on the server, but do they have a MAPI/Exchange profile set up? If they do then you can also use xp_sendmail, although it is limited in its functionality (text-only email, limits on body text length, etc.)
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-10-03 : 19:21:01
Rob, he can not use extended stored procedures (take a look at initial post), so xp_sendmail is out and so is sp_OA* (those are extended as well).

Tara
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2003-10-03 : 19:31:12
Now I'm really confused, he said extended procedures and then mentioned "sp_create" which I assume means he'll have to stick with ActiveX tasks.

<well-intentioned rant>

Cough up a little extra dough and get a host that lets YOU do what YOU want/need to do. Why give ANY money to someone who makes your job harder? It's not like you have to pay $100 a month for this privilege either. Dump 'em and tell them "cause you a--holes won't let me use xp_sendmail". And they're unlikely to care if they lose your business anyway...which also means they don't care if they have it. Companies that act like they don't want your business are simply not worth dealing with.

</well-intentioned rant>
Go to Top of Page

sschwarze
Starting Member

15 Posts

Posted - 2003-10-06 : 08:21:05
ROBVOLK is totaly correct! But I work for.....2 no 3 companies now. They are all low bugdet or no bugdet companies. I guess the ques is have your ever worked for someone just for the fun of it? Don't get me wrong I like money! I just like the challenge of working on a shoe string. Now back to the topic.

As in the initial post am looking for a command to do a HTTP get or post inside of sql server. TDUGGAN is correct I am unable to use extended stored procedures. Some may ask why HTTP get or post? Well I thought about using .NET web services that are availble to me. The other ques. I have is how to use SOAP commands in SQL Server. The following code was given to me but I am not sure how or where to put it. Is there any hope for me?

SOAP
The following is a sample SOAP request and response. The placeholders shown need to be replaced with actual values.

POST /SendEmail.asmx HTTP/1.1
Host: www.webservicex.net
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://www.webserviceX.NET/SendEmails"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<SendEmails xmlns="http://www.webserviceX.NET">
<ToEmailAddress>string</ToEmailAddress>
<FromEmailAddress>string</FromEmailAddress>
<Subject>string</Subject>
<Body>string</Body>
</SendEmails>
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<SendEmailsResponse xmlns="http://www.webserviceX.NET">
<SendEmailsResult>string</SendEmailsResult>
</SendEmailsResponse>
</soap:Body>
</soap:Envelope>
HTTP GET
The following is a sample HTTP GET request and response. The placeholders shown need to be replaced with actual values.

GET /SendEmail.asmx/SendEmails?ToEmailAddress=string&FromEmailAddress=string&Subject=string&Body=string HTTP/1.1
Host: www.webservicex.net

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://www.webserviceX.NET">string</string>


HTTP POST
The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.

POST /SendEmail.asmx/SendEmails HTTP/1.1
Host: www.webservicex.net
Content-Type: application/x-www-form-urlencoded
Content-Length: length

ToEmailAddress=string&FromEmailAddress=string&Subject=string&Body=string
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://www.webserviceX.NET">string</string>
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2003-10-06 : 11:13:24
I need my house painted...

quote:

They are all low bugdet or no bugdet companies. I guess the ques is have your ever worked for someone just for the fun of it? Don't get me wrong I like money! I just like the challenge of working on a shoe string.



Do you live in the New York Metro area?

I can certainly accomodate a shoe string...





Brett

8-)

SELECT @@POST FROM Brain ORDER BY NewId()

That's correct! It's an AlphaNumeric!
Go to Top of Page

mharvey
Starting Member

13 Posts

Posted - 2003-10-06 : 14:26:04
You might try using a trigger to write to a user-created "message table". This message table could then be queried periodically to an application off the SQL Server server, which could take advantage of MAPI or other transport message to send the appropriate message to the appropriate user(s).

Aside from that, if your company does not want to install the EXCHANGE server on the Db server, Tara is right - YOU'RE OUT OF OPTIONS.

Good luck,
Michael
Go to Top of Page

rjpaulsen
Starting Member

9 Posts

Posted - 2003-10-08 : 18:11:20
Whenever I e-mail from SQL, I have a general out-going e-mail table that I dump my messages in. (Fields: TO, SUBJECT, MESSAGE, isSent).

An outside process monitors this table and sends any non-sent messages; In our case it's a scheduled Cold Fusion page.

* Simply call the SPROC from anywhere: SQL, Web (asp/.net/cf), Background Services
* DB Server doesn't touch the Internet.
* History of out-going messages.

I've added HTML and attachment abilities to ours and couldn't be happier. Currently all messages are sent from 1 address, but I plan to change that.
Go to Top of Page
   

- Advertisement -