This delphi 7 source code have a function to send SMS trough computer with serial communication. You can modify it for your requirement.
发送: “MPS新能源” 获取验证码,验证成功后下载文件。