Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2092
  • Last Modified:

sp_send_dbmail Limitations

I get the following message with I execute the code belowl. How can I extend the 128 limit. I also get this massage when the @query is longer that 128!

Msg 103, Level 15, State 4, Line 2
The identifier that starts with 'Jon_Peters@Pall.com; Steve_Jordan@Pall.com; Brenda_Robinson@Pall.com;
Pat_Travis@Pall.com; Greg_McIntosh@Pall.com; David_Conn@P' is too long. Maximum length is 128.

exec msdb.dbo.sp_send_dbmail @profile_name="insqlmail",
@recipients = "bill_Peters@all.com; Jon_Jordan@all.com; Brenda_Ball@all.com;
Nat_avis@all.com; George_McIntosh@all.com; Bill_Conn@all.com;
TAkin@all.com; bill_davison@all.com",
@subject="Test Email",
@body="Let me(Ralph Hill) know if you get this"

Open in new window

0
ada_caceres
Asked:
ada_caceres
  • 5
  • 2
  • 2
7 Solutions
 
chapmandewCommented:
very very strange....the @recipients is a varchar(max) field, so it definetly should allow more than 128 characters.
0
 
chapmandewCommented:
try this instead:

exec msdb.dbo.sp_send_dbmail @profile_name='insqlmail',
@recipients = 'bill_Peters@all.com; Jon_Jordan@all.com; Brenda_Ball@all.com;
Nat_avis@all.com; George_McIntosh@all.com; Bill_Conn@all.com;
TAkin@all.com; bill_davison@all.com',
@subject='Test Email',
@body='Let me(Ralph Hill) know if you get this'

0
 
chapmandewCommented:
you had double quotes rather than single quotes

0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
ada_caceresAuthor Commented:
try this instead:

exec msdb.dbo.sp_send_dbmail @profile_name='insqlmail',
@recipients = 'bill_Peters@all.com; Jon_Jordan@all.com; Brenda_Ball@all.com;
Nat_avis@all.com; George_McIntosh@all.com; Bill_Conn@all.com;
TAkin@all.com; bill_davison@all.com',
@subject='Test Email',
@body='Let me(Ralph Hill) know if you get this'

When I did this the emails did not go out!
0
 
chapmandewCommented:
at least you didn't get the error...you may have something configured wrong on your smtp server or your db mail setup.
0
 
Mark WillsTopic AdvisorCommented:
Agree... The recipients list is of type varchar(max).

exec msdb.dbo.sp_send_dbmail
@profile_name='insqlmail',
@recipients = 'bill_Peters@all.com; Jon_Jordan@all.com; Brenda_Ball@all.com; Nat_avis@all.com; George_McIntosh@all.com; Bill_Conn@all.com;TAkin@all.com; bill_davison@all.com',
@subject='Test Email',
@body='Let me(Ralph Hill) know if you get this'
0
 
chapmandewCommented:
yep...if you're not getting delivery, probably should submit a new question.
0
 
Mark WillsTopic AdvisorCommented:
Have a look at :

select * from msdb..sysmail_sentitems
select * from msdb..sysmail_faileditems


Have they all failed? is there anything in there?  have you gone into mail settings and tried a test mail ?  These are all things we can help answer in the new question - be sure to add in the "related question" link so we get notified...
0
 
ada_caceresAuthor Commented:
Sorry, everyone, These were all great suggestions. I tried everything posted but nothing worked. We're doing without this functionality.
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

  • 5
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now