1. Send several views with xp_sendmail
Dear experts, I want to run a query that get several views from the database and then send these views with using xp_sendmail. How can I perform this function in the @query in the xp_sendmail ??? Thanks very much !!!
2. Sending Mail using xp_sendmail - SQL Server DTS
3. Sending an Attachment using XP_sendmail
Hi all,
I know it is possible to send an attachment thru XP_Sendmail.
The file name will change everday due to the date in the file name. so I
created a variable to hold the file location and name. when I run the below
I get an error:
Msg 18025, Level 16, State 1, Line 0
xp_sendmail: failed with mail error 0x80004005
If I remove the @attachments = @attach
it works fine.
Can anyone tell me what I am doing wrong with the attachment?
TIA,
Joe
declare @title varchar(50),@email varchar(2000),@attach varchar
(200),@fileName varchar(30),
@date datetime,@date1 int
Set @date = (select * from dbo.Temp_ISOXML_Attr)
--select @date
Set @date1 = convert(varchar,@date,112)
--Select @date1
set @fileName = 'IcenterReport'+convert(varchar,@date1)
set @title= 'Icenter report Attached'
set @attach = '\\sqld1\E$\XmlFiles\'+convert(varchar,@date1)
select @attach
set @email='Here is the ISO File'
EXEC master..xp_sendmail @recipients = ' XXXX@XXXXX.COM ',
@message = @email,
@subject = @title,
@attachments = @attach
4. using xp_sendmail to send html type content - SQL Server
5. Sending HTML using xp_sendmail
I use xp_sendmail to send a link to our clients. But the link is very long. How can I send an html message using xp_sendmail? Thanks for your help, John
6. problems sending attachments using xp_sendmail. - SQL Server
7. Using XP_SendMail to send XML Results file
I have an urgent solution that I'm developing for... I've written a query for an existing database using the FOR XML EXPLICIT clause of the SELECT command. It generates the results I expect, with one painful exception - its putting in carriage returns in the middle of tags, or anywhere else it feels like! Our existing solution generates CSV files containing the data, this works really well. Our customer now requires these files in XML format. I thought it would be no bother just altering the query to generate the XML. Not so, these CRLFs get stuck in every 2034 characters. This invalidates the XML file totally. Why can't it just put them in after each tag section is closed like most XML files are formatted? We use the XP_SENDMAIL command to transmit files, ideally I don't want to stop using this. What is also decidedly undesirable is using any form of external tool, as have a number of external customers that use copies of the software and we don't want to have to install new software (or pay for it!) on their systems. We don't have any direct access to these systems so any changes have to be scripted fully in SQL. So thats my problem - anyone got any suggestions? Its sending me mad! Thanks Mike
8. Multiple queries with multiple attachments in xp_sendmail - SQL Server