如何在不使用smpplib python的情况下发送长消息

2024-04-29 09:27:05 发布

您现在位置:Python中文网/ 问答频道 /正文

如何使用python smpplib发送没有部分的长消息,我想在一部分中发送长消息

pdu = client.send_message(
        source_addr_ton=smpplib.consts.SMPP_TON_INTL,
        source_addr_npi=smpplib.consts.SMPP_NPI_ISDN,
        source_addr=source,
        dest_addr_ton=smpplib.consts.SMPP_TON_INTL,
        dest_addr_npi=smpplib.consts.SMPP_NPI_ISDN,
        destination_addr=dest,
        short_message=message,
        data_coding=encoding_flag,
        registered_delivery=True
 )

Tags: 消息sourcemessagesmppdestaddrpduintl
1条回答
网友
1楼 · 发布于 2024-04-29 09:27:05

通过SMPP,您只能使用payload可选参数(在本例中,short_message参数应为空)在一部分(一次提交)中发送长消息,并且只有在SMPP提供程序允许的情况下(并非所有提供程序都允许)

否则,您唯一的选择就是将长消息拆分为多个部分(考虑编码)

相关问题 更多 >