因此,数据库邮件程序将短信发送到 Verizon、att、Cricket 等。但是当使用 messing.sprintpcs.com 发送到 sprint 电话号码时,他们会收到一条看起来像是加密消息的文本。
我们尝试过使用不同的 sprint 用户和不同的手机。所有相同的结果。
感谢您的时间。
因此,数据库邮件程序将短信发送到 Verizon、att、Cricket 等。但是当使用 messing.sprintpcs.com 发送到 sprint 电话号码时,他们会收到一条看起来像是加密消息的文本。
我们尝试过使用不同的 sprint 用户和不同的手机。所有相同的结果。
感谢您的时间。
我的问题是 sp_send_dbmail 的 @body_format 设置为“html”。虽然其他服务对此没有问题,但 Sprint 具有导致问题的严格字符限制。
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;