Vb.net短信多个收件人 [英] Vb.net SMS multiple recipcient
问题描述
我已经搜索谷歌和任何其他论坛,但我仍然困惑,无法找到正确的答案。下载了所有可能有用的文件,但仍无人工作。
我知道这可能是MFAQ之一,但请不要将我推荐给任何其他人。
我正在使用文本爆炸系统。我能够向我的电话号码发送消息,但现在情况有所不同,我想向多个联系电话号码发送消息。
我很难理解循环,我知道或相信这个需要一个循环过程来完成。
任何人都可以帮助我这是发送短信的代码。
尝试
使用SerialPort1
。写( < span class =code-string> at& vbCrLf)
Threading.Thread.Sleep( 1000 )
。写入( at + cmgf = 1& vbCrLf)
Threading.Thread.Sleep ( 1000 )
.Write( at at + cmgs =& Chr( 34 )& txtNumber.Text& Chr( 34 )& vbCrLf& Chr( 34 ))
.Write(rtbMessage.Text& vbNewLine& vbNewLine& 注意:请不要回复。& Chr( 26 ))
线程.Tread.Sleep( 1000 )
以
结束MessageBox.Show( 消息已发送!, [BMS - SMS Blast] - 发送完成,MessageBoxButtons.OK,MessageBoxIcon.Information)
Catch ex As Exception
MessageBox.Show(ex.Message, 错误,MessageBoxButtons.OK,MessageBoxIcon.Error)
结束尝试
我尝试了什么:
我特意尝试了一些代码他但没有人工作。
请参阅 For ... Next Statement(Visual Basic) [ ^ ]。
I already hunt google and any other forums but im still confused and cant find the right answer. Downloaded all possible files that might help but still no one works.
I know that this might be one of the MFAQ's but please do not refer me to any other else.
I am working with a text blast system. I was able to send a message to my phone number but the case now is different, I wanted to send a message to multiple contact numbers.
I have a hard understanding with the loop and I know or believe that this one require a loop process to complete.
Can anyone assist me this is the code for sending SMS.
Try
With SerialPort1
.Write("at" & vbCrLf)
Threading.Thread.Sleep(1000)
.Write("at+cmgf=1" & vbCrLf)
Threading.Thread.Sleep(1000)
.Write("at+cmgs=" & Chr(34) & txtNumber.Text & Chr(34) & vbCrLf & Chr(34))
.Write(rtbMessage.Text & vbNewLine & vbNewLine & "Note: Please do not Reply." & Chr(26))
Threading.Thread.Sleep(1000)
End With
MessageBox.Show("Message Sent!", "[ BMS - SMS Blast ] - Sending Complete", MessageBoxButtons.OK, MessageBoxIcon.Information)
Catch ex As Exception
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
What I have tried:
I have tried a lot specially some codes here but no one works.
See For...Next Statement (Visual Basic)[^].
这篇关于Vb.net短信多个收件人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!