473,513 Members | 2,677 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using xp_sendmail in ASP?

Does anyone have a code snippet or example on using the xp_sendmail
SQL procedure from an ASP page (VBscript)? I have no problem with the
stored procedure from a query and I think my problem is getting the
parameters passed to the procedure correctly, or just in using stored
procedures from ASP.

I can execute this SQL from Query Analyzer fine:

xp_sendmail "testuser", "Hello World!"

I've tried this in ASP:

strSQL = "EXEC xp_sendmail 'testuser', 'Hello World!'"
conn.Execute strSQL

But I don't get any error, no mail gets sent and it hangs my test
server. I'm using the SA account and password for the OLEDB
connection. Can't tell if the server is hanging in SQL or ASP, but it
locks up hard, no keyboard/mouse functions even work.

What the heck am I screwing up here...?

Jeff
Jul 19 '05 #1
0 1286

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
23637
by: Jürgen Hetzel | last post by:
Hello! My environment is: Win 2000 Server, MS SQL-Server 2000 (SP2) and MS ExchangeServer 5.5 the two following TransactSQL-codepieces show different results: 1. with attachment
1
6931
by: Ted Theodoropoulos | last post by:
when creating a sp in SQL 2K that uses xp_sendmail i get a message saying: Cannot add rows to sysdepends for the current stored procedure because it depends on the missing object 'xp_sendmail'. The stored procedure will still be created. does this mean that only dependencies involving xp_sendmail will not be stored? the other...
2
6397
by: Terri | last post by:
I know formatting should be handled in the client app and not in SQL Server but this is the situation I must develop in so any help would be appreciated. I'm running the following in Query Analyzer USE Pubs DECLARE @MessageSubject VARCHAR(50) SELECT @MessageSubject = 'Report' EXEC master.dbo.xp_sendmail 'me@mine.com',
1
526
by: John Milano | last post by:
I have everything set up with SQL Server 2000 and Outlook 2000 and the procedure works fine but the message sits in my inbox. When it open the e-mail it says this message has not been sent. I just click send and the e-mail sends. Is there any reason I have to manually sent the e-mail after the xp_sendmail procedure works and should send the...
6
2457
by: Nathan Griffiths | last post by:
I have been testing our SQL Mail setup in SQL Server 2000 (sp3a) and have found that when I attach results as a file, every other character is a control character which causes each real character output on a separate line. I have no idea why this is happenening, I've never seen it before. The code looks like this; EXEC...
6
2472
by: Rolf Kemper | last post by:
Dear All, we are running SQL2000 Sever and make use of the xp_sendmail. For any reason the mail service can run into problems and it looks like that the statemnt below gets not finished. EXEC @Status = master..xp_sendmail @recipients=@TOList, @copy_recipients=@CCList,@subject='the subject goes here',@message=@MailText,@no_output=TRUE
1
1353
by: telenet | last post by:
I'm working with sqlserver2000 on a server2003. My e-mail via xp_sendmail is working good. But I have one problem --> every mail I send via xp_sendmail does not appear in de sent-items van the account of the mapi on my server. Can someone give a hint to solve this problem ? thanks
2
3139
by: Eric Timely | last post by:
After a trust with exchange server established the xp_SendMail gives the following error: xp_sendmail: failed with mail error 0x80070005 Prior to the trust everything worked fine. I have tried the following: 1)Checking SQL and SQLAgents accounts all match up with default mail profile.
3
6000
by: sachin shah | last post by:
hi all my query is how can i send mail by using sql server, i think by unsing xp_sendmail store procedure we can do this but my problem is what paramater to be pass to this store procedure if i want to send mail from my local machine to another user, bcos i am geeting this error msg in query analyzer... query:-EXEC master..xp_sendmail...
0
7269
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7394
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
5701
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4756
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3248
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3237
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1611
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
811
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
470
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.