Reputation: 104
So the database mailer sends the sms to Verizon, att, Cricket etc.. but when sending to a sprint phone number using messaging.sprintpcs.com they receive a text with what looks to be the message encrypted.
We have tried with with different sprint users and different phones. All the same results.
Thank you for your time.
Upvotes: -1
Views: 57
Reputation: 104
My issue was that @body_format of the sp_send_dbmail was set to 'html'. While other services were okay with this, Sprint has strict character limits that were causing issues.
DECLARE @BodyFormat nvarchar(20) = 'HTML'
IF ISNUMERIC(SUBSTRING(@EmailTo, 1, 7)) = 1
SET @BodyFormat = 'TEXT'
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'Profile',
@from_address = @EmailFrom,
@recipients = @EmailTo,
@copy_recipients = @CC,
@blind_copy_recipients = @BCC,
@subject = @Subject,
@body = @Body,
@mailitem_id = @MailItemID OUTPUT,
@body_format = @BodyFormat;
Upvotes: 0