Tuesday, March 20, 2012

plain text mails

How can I set the default body_format in database mail. I would like to send a warning with plain text format (from the alerts), that i'll get on my mobile phone, but the message's format is html... always...and I don't get the sms-s.Hmm...I believe the default format is text. However, whenever you call sp_send_dbmail, you can specify the @.body_format param to be 'TEXT' so that you know it will be sent as text. To test, send a couple of test emails to an email account. If they are text, then you know you are on the right track. You could even put some html tags inside of the text body to ensure that it isn't formatted as html.|||i know this, but i would like to send an email from the ssms's GUI environment (alerts).
i get an error message...i can send email in plain text format only...but i can't modify the body_format value (in gui environment)...this is a smtp server problem ?...i don't know
) ... sorry my English is not too good...)
...just a comment, when i'm trying to send a mail from the database mail test ...it's success...but from the alert...unsuccess...|||One option is to run Profiler as you are trying to send an email from the GUI. That way, you can find out exactly what is being sent to the database. That may help.
Tim|||I traced "Send Test-Email" process.

I got this:

declare @.mailid int

EXECUTE [msdb].[dbo].[sp_send_dbmail]
@.profile_name = 'DBA'
,@.recipients = 'csaba.molnar_sms@.domainname.com'
,@.body = 'This is a test e-mail sent from Database Mail on FAR03.'
,@.subject = 'Database Mail Test'
,@.mailitem_id = @.mailid OUTPUT

select @.mailid

and I got a sms on my mobile...in unreadable format :
"VGhpcyBpcyBhIHRIc3QgZS1tYWIsIHNIbnQ..."blablabla

I think, th body_format value is wrong. Where can I set this value for the instance?

No comments:

Post a Comment