는 SMS 게이트웨이의 XML-RPC API를 통해 SMS를 보낼 수있는 쉬운 방법을 제공하는 플러그인이있다, sipgate.de, sipgate.com
:
베어 코드처럼 보였다
'의 conf/Config.groovy 파일'
grails.plugins.sipgate.username = 'YOUR_USERNAME'
grails.plugins.sipgate.password = 'YOUR_PASSWORD'
//According to E.164,
에
grails install-plugin sipgate
명령을
및 편집 계정 데이터 자리 표시자를 사용하여 설치3210
예 : '4922112345678'grails.plugins.sipgate.phoneNumber = 'YOUR_PHONE'
다음 'sipgateService
'을 주입하고 SMS를 보낼
def sipgateService
def phoneNumber = '4917712345678' //phoneNumber according to E.164 specification //working alternative: def phoneNumber = '+1-719-555-1234'
def result = sipgateService.sendSMS(phoneNumber, 'This is my Text to send!')
result? println 'Sending Successful': println 'Sending failed'