Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 7,2000
»
T-SQL
»
Create a scheduled task to email from SQL
20 posts, Page 2 of 2
««
1
2
Create a scheduled task to email from SQL
Rate Topic
Display Mode
Topic Options
Author
Message
RBarryYoung
RBarryYoung
Posted Tuesday, October 21, 2008 10:58 AM
SSCrazy Eights
Group: General Forum Members
Last Login: Saturday, May 04, 2013 11:13 AM
Points: 9,855,
Visits: 9,374
Log in to the SQL Server's Outlook client & mailbox yourself on the Server and try to set your defaults that way.
-- RBarryYoung
,
(302)375-0451
blog:
MovingSQL.com
, Twitter:
@RBarryYoung
Proactive
Performance Solutions, Inc.
"Performance is our middle name."
Post #589310
Ramon Jimenez
Ramon Jimenez
Posted Wednesday, October 22, 2008 3:15 AM
Mr or Mrs. 500
Group: General Forum Members
Last Login: Wednesday, October 31, 2012 7:49 AM
Points: 538,
Visits: 107
You can send emails without outlook just with cdosys. Take a look at How to send e-mail without using SQL Mail in SQL Server
http://support.microsoft.com/kb/312839/en-us
Regards Ramon
Post #589674
Arif Hafeez-Imam
Arif Hafeez-Imam
Posted Wednesday, October 22, 2008 11:10 AM
Grasshopper
Group: General Forum Members
Last Login: Tuesday, June 01, 2010 5:45 AM
Points: 19,
Visits: 73
Yeah I think i will stick to the xp_sendmail function for now as it seems to be a bit quicker and easier to use. Will defo read up on it tho.
Cheers!!
With the code below
EXEC master.dbo.xp_sendmail
@recipients = N'',
@query = N'EXEC RPT_3_Daily ''21-oct-2008''',
@subject = N'UK1428',
@message = N'Please find new information attached.',
@attach_results = 'TRUE',
@width = 250,
@separator = ',',
@no_header = 'TRUE',
@attachments = 'New.csv'
the attachment I receive doesn't sit in the columns properly, I have opened the file up using notepad++ which displays a lot of "NULL" values when the stored procedure to be run contains characters as well as numerics in the results, however if I use the same code as above and use a stored procedure that will only produce numbers then the csv displays fine and even opens in excel, is there something else that I have missed off to allow the file produced display and organise the alphanumeric characters correctly within excel?
Post #589972
RBarryYoung
RBarryYoung
Posted Wednesday, October 22, 2008 12:20 PM
SSCrazy Eights
Group: General Forum Members
Last Login: Saturday, May 04, 2013 11:13 AM
Points: 9,855,
Visits: 9,374
This is probably caused by commas in your string-based columns. You will need to put quotation marks around the columns that might have commas embedded in their text. Alternatively, use a different separator character (like TAB) that you are sure will not be in any of the columns.
-- RBarryYoung
,
(302)375-0451
blog:
MovingSQL.com
, Twitter:
@RBarryYoung
Proactive
Performance Solutions, Inc.
"Performance is our middle name."
Post #590031
yukthi
yukthi
Posted Monday, November 10, 2008 2:00 AM
SSC Rookie
Group: General Forum Members
Last Login: Friday, January 28, 2011 9:02 AM
Points: 37,
Visits: 36
Hi,
I want to send mail's from sql ,
eg: Consider table as Table1 , with 1 column as modifiedon, When the modifiedon date is greated than 2 days of last modified date than mail has to be automatically sent to users.
In google i read this can be done in SQLMAil,
Can you please give me details steps to do this.
Thanks in Advance,
Archana
Post #599689
RBarryYoung
RBarryYoung
Posted Monday, November 10, 2008 4:38 PM
SSCrazy Eights
Group: General Forum Members
Last Login: Saturday, May 04, 2013 11:13 AM
Points: 9,855,
Visits: 9,374
You can find this in BOL(Books Online). If you still need help, then please start a new topic.
-- RBarryYoung
,
(302)375-0451
blog:
MovingSQL.com
, Twitter:
@RBarryYoung
Proactive
Performance Solutions, Inc.
"Performance is our middle name."
Post #600297
Arif Hafeez-Imam
Arif Hafeez-Imam
Posted Tuesday, November 11, 2008 1:25 AM
Grasshopper
Group: General Forum Members
Last Login: Tuesday, June 01, 2010 5:45 AM
Points: 19,
Visits: 73
cheers for the help, will have a play and let you know the outcome.
thanks again
Post #600460
RBarryYoung
RBarryYoung
Posted Tuesday, November 11, 2008 7:15 AM
SSCrazy Eights
Group: General Forum Members
Last Login: Saturday, May 04, 2013 11:13 AM
Points: 9,855,
Visits: 9,374
Glad we could help.
-- RBarryYoung
,
(302)375-0451
blog:
MovingSQL.com
, Twitter:
@RBarryYoung
Proactive
Performance Solutions, Inc.
"Performance is our middle name."
Post #600646
Arif Hafeez-Imam
Arif Hafeez-Imam
Posted Monday, December 01, 2008 10:30 AM
Grasshopper
Group: General Forum Members
Last Login: Tuesday, June 01, 2010 5:45 AM
Points: 19,
Visits: 73
Hi Guys,
back already!!!!!
Right.... i got the xp_sendmail function working and have started to have a play with the CDONTs functions which to my surprise I have managed to do and send a HTML bodied email from the SQL server without requiring Outlook to be installed on it, now to be a complete pain:
I want to be able to send the results from a working stored procedure as various attachments to this pretty HTML email that CDONTs produces. I have been able to send SP's as attachments using the xp_sendmail function which seems pretty straight forward but would like to use the CDONTs now as it seems like a more powerful way. The formats that I want to be able to attach are 1 SP to a csv file and 1 SP to a pdf file. They don't necessarily have to be on the same email but also is that possible?
thanks again for all your previous help and thanks in advance for the help to follow!!!
:D
Post #611490
RBarryYoung
RBarryYoung
Posted Monday, December 01, 2008 11:44 AM
SSCrazy Eights
Group: General Forum Members
Last Login: Saturday, May 04, 2013 11:13 AM
Points: 9,855,
Visits: 9,374
This is a different question. You should start a new topic.
-- RBarryYoung
,
(302)375-0451
blog:
MovingSQL.com
, Twitter:
@RBarryYoung
Proactive
Performance Solutions, Inc.
"Performance is our middle name."
Post #611559
« Prev Topic
|
Next Topic »
20 posts, Page 2 of 2
««
1
2
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.