Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


xp_sendmail - empty subject


xp_sendmail - empty subject

Author
Message
Rupert Woodman
Rupert Woodman
Grasshopper
Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)

Group: General Forum Members
Points: 11 Visits: 1
Hi Balmukund,

In Outlook 2003, I can see an option to change to use Word as the default editor, but as I don't have Word installed on the machine, this option is greyed out.
I don't see how I can change to use notepad as the default mail editor - could you elucidate please?

Many thanks
bledu
bledu
Say Hey Kid
Say Hey Kid (695 reputation)Say Hey Kid (695 reputation)Say Hey Kid (695 reputation)Say Hey Kid (695 reputation)Say Hey Kid (695 reputation)Say Hey Kid (695 reputation)Say Hey Kid (695 reputation)Say Hey Kid (695 reputation)

Group: General Forum Members
Points: 695 Visits: 104
DECLARE @To VARCHAR(500)
DECLARE @MessageString VARCHAR(500)
DECLARE @User1Email VARCHAR(500)
DECLARE @Topic VARCHAR(200)

SET @MessageString ='This script will send an email'

SET @User1Email = 'someone@mars.com' -- use semi colon to seperate many email addresses

SET @To = @User1Email

SET @Topic = 'Test SQL Send Email'

EXEC Master..xp_sendmail
@recipients = @To
,@message = @MessageString
,@subject = @Topic


Everything you can imagine is real.

Daniel Cho
Daniel Cho
Grasshopper
Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)

Group: General Forum Members
Points: 24 Visits: 72
Can you try turning off caching on your outlook client?
Rupert Woodman
Rupert Woodman
Grasshopper
Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)

Group: General Forum Members
Points: 11 Visits: 1
Hi Bledu,

Thanks for your suggestion.

I don't think you understood my problem fully.

I can send an email, and for one user it works perfectly, another user, on the same machine, it sends an email with an empty subject line.

I did a cut & paste of your code, just changing the email address, and it behaved as my current script - the subject line comes through as blank.

Rgds
bledu
bledu
Say Hey Kid
Say Hey Kid (695 reputation)Say Hey Kid (695 reputation)Say Hey Kid (695 reputation)Say Hey Kid (695 reputation)Say Hey Kid (695 reputation)Say Hey Kid (695 reputation)Say Hey Kid (695 reputation)Say Hey Kid (695 reputation)

Group: General Forum Members
Points: 695 Visits: 104
I have win xp with latest update, outlook 2003 and sql 2000 with service pack 4.
i tried to setup with similar stuff like yours and it works fine.

this removes the problem of you having to go to an earlier version of outlook.

i can not duplicate your problem though. your settings work fine on my machine.
why don't you try installing service pack 4 for sql server 2000, it might solve your problem.


Everything you can imagine is real.

Rupert Woodman
Rupert Woodman
Grasshopper
Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)

Group: General Forum Members
Points: 11 Visits: 1
Thanks for doing all that Bledu - much appreciated.

I'm coming to the conclusion that I'll have to apply a service pack and see what happens. I didn't really want to as it'll then mean I'll have to go through the acceptance process with the users before I can update the live server, which will take time etc, but I guess I have no real choice.

Rgds
Daniel Cho
Daniel Cho
Grasshopper
Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)

Group: General Forum Members
Points: 24 Visits: 72
I experienced the same problem on a new development machine of ours. The solution was to turn OFF caching on the outlook client. Also, it wasn't just the subject which was affected. Sending a query attachment was not working as well. Turning off the caching fixed both of our issues.

Hope that helps.
Daniel Cho
Daniel Cho
Grasshopper
Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)

Group: General Forum Members
Points: 24 Visits: 72
Also, after caching has been turned off, you should restart SQL Mail by executing xp_stopmail then xp_startmail.
bledu
bledu
Say Hey Kid
Say Hey Kid (695 reputation)Say Hey Kid (695 reputation)Say Hey Kid (695 reputation)Say Hey Kid (695 reputation)Say Hey Kid (695 reputation)Say Hey Kid (695 reputation)Say Hey Kid (695 reputation)Say Hey Kid (695 reputation)

Group: General Forum Members
Points: 695 Visits: 104
I have cached mode turned on, and I could not duplicate the error. Have you installed the service packs as yet?


Everything you can imagine is real.

Rupert Woodman
Rupert Woodman
Grasshopper
Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)

Group: General Forum Members
Points: 11 Visits: 1
Hi Daniel,

Thanks for the suggestion.
I've had a look at my outlook client and I can't find mention of caching - could you tell me where it is?

many thanks
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search