?
Solved

SQL SERVER 2000 - xp_sendmail: Could not resolve recipient

Posted on 2003-03-05
5
Medium Priority
?
1,150 Views
Last Modified: 2007-12-19
All,



I am having trouble firing the following SP...

NOTE - this worked fine in SQL 6.5 but until an upgrade has'nt worked..

BEGIN
declare @mgname varchar(255)
declare @mgsubject varchar(255)
select  @mgsubject = ' '
select  @mgname = (select a.swextemailaddress from sw_person a, sw_hd_case b where b.swreportedby = a.swpersonid and b.swhdcaseid = @swhdcaseid)
declare @mgsubject1 varchar(255)
select  @mgsubject1 = 'Your Call logged with ABB has been closed - '+ convert(varchar(35),@swhdcaseid)
declare @mgemailquery varchar(255)
select @mgemailquery ='vantivtest..dtsp_email_getinfo_closed '+ convert(varchar(25),@swhdcaseid)
exec master..xp_sendmail @mgname,@mgsubject , @mgemailquery, @width=250,@separator=' ',@subject= @mgsubject1
END

GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

I recive the error - xp_sendmail: Could not resolve recipient

When i modify the 'select  @mgname = ' to contain a correct email address ( ie myname@hotmail.com ) it work fine...

Is there a known problem in SQL 2000. I do not want to hard code the email address into the SP..

cheers

Ian.
0
Comment
Question by:ianjevans
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 43

Expert Comment

by:Eugene Z
ID: 8102995
can you run :
--------------------------------------
declare @mgname varchar(255)
declare @mgsubject varchar(255)
select  @mgsubject = ' '
select  @mgname = (select a.swextemailaddress from sw_person a, sw_hd_case b where b.swreportedby = a.swpersonid and b.swhdcaseid = @swhdcaseid)
--------------------------
print @mgname

--And see what @mgname is ... first...
0
 

Author Comment

by:ianjevans
ID: 8107865

EugeneZ

Results from the Result window after placing the 'Print' line into the SP.....

ievans@deloitte.com.au                  
Server: Msg 18031, Level 16, State 1, Line 0
xp_sendmail: Could not resolve recipient

0
 
LVL 43

Accepted Solution

by:
Eugene Z earned 200 total points
ID: 8110802
TRY:
          ...RTRIM(LTRIM(a.swextemailaddress)) ...
0
 

Author Comment

by:ianjevans
ID: 8116510
EUGENEZ

All works fine...

Thanks for all your help ..

cheers

Ian

0
 

Expert Comment

by:Nitzos
ID: 13012041
Very time over, but now I stop my program at this problem.
I look in MS-Article KB315666
Microsoft confirme that it is a bug
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question