Hi,


I am composing a SMS with a line break in the code:
/Hi Joe,
Your receiving this message because....
/
However, it is being shown in the delivered SMS as:
/Hi Joe,
???Your receiving this message because.....
/
Does the system read \r\n or < br / >?


Ash


 


-------------------------------------------------------------------------------------------------


 


Hi Ash


Brad showed me the code you were using. Have you tried changing it to something like this?


$message = "Hi {$name[0]},\nHow are you?";


I.e. put the newline character in as \n.


Cheers
Matt


 


-------------------------------------------------------------------------------------------------


 


 


Hey Matt,


\r\n is printed in the message, so that would assume that the system
doesn't read any code.


And with


"Hi {$name[0]},
You are receiving this message due to a lost pin request
has been made on your account. Your pin is: {$check['pin']}"


It still includes the ??? in the message


Kind Regards,


Ash


 


-------------------------------------------------------------------------------------------------


 


Can you send me the whole file so I can see exactly which API methods etc you are using please?


Whats worse is that the ??? is not showing up on the Overview page in
admin. Could it possibly be the photo itself failing to decode correctly?


Kind Regards,


Ash


 


-------------------------------------------------------------------------------------------------


 


$mobile = '61'.substr(str_replace(' ', '', $check['mobile']), 1);
if (strlen($mobile) > 0) $sms_sent = "Message Not Sent: There
was an error with your mobile number. Please double check it is correct.";
else $sms_sent = "Message Not Sent: No Mobile number specified.";
if (strlen($mobile) == 11 && is_numeric($mobile)) {
$name = explode(' ', $check['name']);
loadclass('burstsms');
$sms = New transmitsmsAPI(BURSTSMS_APIKEY, BURSTSMS_APISECRET);
$methodResponse = $sms->SMS($mobile, "Hi {$name[0]},
You are receiving this message due to a lost pin request
has been made on your account. Your pin is: {$check['pin']}",
BURSTSMS_CALLERID);
// parse response into xml object
$xml = @simplexml_load_string($methodResponse);


$sms_sent = ((string) $xml->data->result == 'queued') ?
$mobile : "Message not Sent: " . (string) $xml->data->message;
}


As you can see, it is reading the line break but it does add the ??? on
there. Is there like a unknown character replacement with the ???


Kind Regards,


Ash


 


-------------------------------------------------------------------------------------------------


 


I have run a few more tests from my end.


* removing the variables doesn't change anything
* adding an extra line break works and has 2 question marks instead of 3


My initial test had 2 line breaks and there was NO question marks. The
only thing that changed between that and what is there now is that the
api key and secret and caller id is in a defined variable.


Kind Regards,


Ash


 


-------------------------------------------------------------------------------------------------


 


have you tried with exactly this?


"Hi {$name[0]},\nYou are ..."


So, it's all on one line with no actual newlines instead just "\n".


 


-------------------------------------------------------------------------------------------------


 


I did try that, but with \r\n (habit). I'll give just the \n a go


Kind Regards,


Ash


 


-------------------------------------------------------------------------------------------------


 


Well, I'll be buggered. That worked. Why not with \r\n though?


Kind Regards,


Ash


 


-------------------------------------------------------------------------------------------------


 


No problem, if you have any further technical questions email helpdesk@burstsms.com for fastest response.


Brad