Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

smtp Sendmail routine
I am using an smtp routine that uses CDO to send an email message from a
trigger when a record is added.  The question this newbie has is this:

using 'text/plain'


<<Message text>>
Name: Firstname M. Lastname CaseNo : 200512345 Counselor : XYZ Group:
ABC AdmitDate : Oct 28 2005

<<end Message text>>


What I am trying to get is a formatted message that looks like this:

<<Message text>>

Name: Firstname M. Lastname
CaseNo : 200512345
Counselor : XYZ
Group: ABC
AdmitDate : Oct 28 2005

<<end Message text>>


This is the trigger code that sends the message....

CREATE TRIGGER  NotifyStaffOfAdmissi
on ON [dbo].[ADSRoster]
FOR INSERT
AS
Declare @queryresult varchar(8000)
Set @queryresult = (SELECT  ' Name: ' + NAME +Char(10)+Char(13)+ '
CaseNo : ' + CASENO +Char(10)+Char(13)+ ' Counselor : ' + COUNSELOR
+Char(10)+Char(13)+ '  Group: ' + [GROUP] +Char(10)+Char(13)+ '
AdmitDate : ' + CAST(ADMITDATE AS nchar(11)) AS Note FROM Inserted)


EXEC dbo.sp_sendSMTPmail
@To='jpmuir@xyz.org;LarryS@xyz.org',
@Subject='New Client',
@Body= @queryresult,
@Cc='',
@Bcc='',
@Attachments='',
@HTMLFormat=1,
 @From='IBHCensus@XYZ
.org'

I thought the char(10) and char(13) linefeeds and carriage returns would
fly but Outlook either strips them or they die another death in between.

Any insight to how I can get this going?  Is Plain text the problem?
(perhaps I need to use Html?)

Jim M.

Report this thread to moderator Post Follow-up to this message
Old Post
Jim Muir
10-31-05 06:23 PM


Sponsored Links





Last Thread Next Thread
Post New Thread

MS SQL Server archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 03:27 PM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006