2012-03-12 3 views
1

우리 회사에서 SMS 게이트웨이를 통해 경고를 보내야합니다. 자바로 Nexmo API를 사용했습니다. 그것은 완벽하게 작동하지만 우리 회사는 서비스를 구매할 수 없기 때문에 생각하고있었습니다. 무료 SMS 게이트웨이가 있습니까?자바로 무료 SMS 보내기

+0

에게 site2sms 사용하여 SMS를 전송하는 데 사용됩니다, 당신은 높은 볼륨을하고있는, Nexmo 무엇을 볼 수 있습니다 문의 끝내십시오 (* 면책 조항 : Nexmo *와 협력합니다). 또는 이러한 경고가 사용자를위한 것이라면 아마도 (해당 기능을 원할 경우) 가입하고 API 자격 증명을 전달할 수 있습니다. –

+0

@TimLytle에서 저에게 지원을 제공 할 수 있습니까? – fers

+0

@fers 여기 티켓을 추가하십시오 : https://nexmo.zendesk.com/ 그리고 응답을 받았는지 확인하겠습니다. –

답변

0

메시지의 특정 숫자를 제한하거나 다른 제한을 부과 할 수 있습니다 당신이 발견 한 무료로 제공 업체가 있습니다. 그러나 많은 제공 업체가 메시지를 보내는 데 사용할 수있는 email gateway을 지원합니다. 예를 들어 셀 번호가 있고 공급자 (이 예에서는 Verizon Wireless)를 알고있는 경우 [email protected]으로 전자 메일을 보내면 셀에 SMS 메시지로 전송됩니다. 이것은 고려해야 할 대안 일 수 있습니다.

0

아래 프로그램이 메시지 당 비용이 문제가있는 경우 게이트웨이

import java.io.BufferedReader; 
import java.io.InputStreamReader; 
import java.net.URL; 
import java.net.URLConnection; 

public class SendSMS 
{ 
static String SMSApi = "https://site2sms.p.mashape.com/index.php?uid=9095393259&pwd=554182&phone=9751931673&msg=hai"; 
static String head = "aVi7utR6ZUkGLFkGRwXxd4wLsXz7c1QQ"; 
public static void main(String[] args) 
{ 
    try 
    { 
     String url = SMSApi; 
     String smsApiResponse = sendMySMS(url); 
     System.out.println(smsApiResponse); 
    } 
    catch (Exception e) 
    { 
     e.printStackTrace(); 
    } 
} 

private static String sendMySMS(String url) 
{ 
    StringBuilder output = new StringBuilder(); 
    try 
    { 
     URL hp = new URL(url); 
     System.out.println(url); 
     URLConnection hpCon = hp.openConnection(); 
     hpCon.setRequestProperty("X-Mashape-Authorization", head); 
     BufferedReader in = new BufferedReader(new InputStreamReader(hpCon.getInputStream())); 
     String inputLine; 
     while ((inputLine = in.readLine()) != null) 
      output.append(inputLine); 
     in.close(); 
    } 
    catch (Exception e) 
    { 
     e.printStackTrace(); 
    } 
    return output.toString(); 
} 

}