|
Home > Archive > MS SQL Server > October 2005 > xp_sendmail
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
|
| I have a TSQL query I have created which looks at MS Great Plains sales
tables, selects records with today's date, captures several local variables
and then launches xp_startmail and xp_sendmail, configures an email replay
and sends it to the customer, then calls xp_stopmail. A WHILE loop keeps the
process going until all selected records have been responded to.
The process works without a hitch for the first 78 records. Then I get the
following error:
Server: Msg 18025, Level 16, State 1, Line 0
xp_startmail: failed with mail error 0x80040108
Server: Msg 18025, Level 16, State 1, Line 0
xp_sendmail: failed with mail error 0x80040108
Stopped SQL Mail session.
The program continues to loop through the rest of the records and repeats
the above message until the WHILE loop is finished.
After stopping and restarting SQL, running the query again yields the same
result. What could cause it to break in the middle of the execution?
T
| |
| John Bell 2005-10-29, 8:23 pm |
| Hi
It is not clear why you call xp_startmail/xp_stopmail each time and not just
once at the start and end!
John
"T." <T@discussions.microsoft.com> wrote in message
news:1B333506-9732-4256-A555- DFDFDB84716B@microso
ft.com...
>I have a TSQL query I have created which looks at MS Great Plains sales
> tables, selects records with today's date, captures several local
> variables
> and then launches xp_startmail and xp_sendmail, configures an email replay
> and sends it to the customer, then calls xp_stopmail. A WHILE loop keeps
> the
> process going until all selected records have been responded to.
>
> The process works without a hitch for the first 78 records. Then I get
> the
> following error:
>
> Server: Msg 18025, Level 16, State 1, Line 0
> xp_startmail: failed with mail error 0x80040108
> Server: Msg 18025, Level 16, State 1, Line 0
> xp_sendmail: failed with mail error 0x80040108
> Stopped SQL Mail session.
>
> The program continues to loop through the rest of the records and repeats
> the above message until the WHILE loop is finished.
>
> After stopping and restarting SQL, running the query again yields the same
> result. What could cause it to break in the middle of the execution?
>
> T
|
|
|
|
|