SMTP 2 SMS

SMTP 2 SMS SearchSearch
Author Message
keith watson
New member
Username: Wkdr3d

Post Number: 1
Registered: 02-2009
Posted on Monday, February 23, 2009 - 05:24 pm:   

I have setup nowsms as to allow email to sms as per the manual, but when i send a txt using it (telnet to the nowsms server send the mail using mail from: rcpt to: then data, then . with the content of data being a simple hello world) The txt arrives on the mobile of the user but only contains 2 // i have sent to 2 diffrent mobiles a blackberry and a n95 with the same results.

Using NowSmS 2008
Any Ideas ?

Regards
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 506
Registered: 08-2008
Posted on Monday, February 23, 2009 - 08:37 pm:   

That's strange ... but then again, you're sending an SMTP e-mail using Telnet.

So it's likely that you're not including standard headers that NowSMS parses for.

Actually, if I understand you correctly, the only content of your "DATA" command is "hello world", followed by a line starting with ".".

That's going to be a problem. If you did that in submitting a message to a real e-mail client, you'd essentially have a blank message as well (or more likely the mail server is going to reject the message as malformed).

The "DATA" of an SMTP mail message starts with one or more headers ... then has a blank line ... then the message content.

NowSMS parses the "From:" address from the SMTP mesasge header. And the "Subject:" header.

So at a minimum, you'd need to have something like this:


quote:

From: blah <blah@blah.com>
Subject: test subject

message content




Technically, NowSMS isn't going to care too much if there is no "From:" or "Subject:", but it's not going to find the message content unless you have at least one header and a blank line before the message content.

The "//" are from the default SMS message template, which puts from the "From" and "Subject" into the text of the message.

There are configuration options to change this format:

You can edit MMSC.INI, and under the [MMSC] header, add EMailSMSTextOnly=Yes to tell NowSMS to only use the text of the e-mail in the SMS (ignore the from and subject).

Or, there is a template setting to allow some changes to the standard SMS to e-mail format (From /Subject /Message Text) used by NowSMS. To change the SMS to e-mail format, edit MMSC.INI, and add an SMSEMailTemplate= setting to define a template for the SMS to e-mail format. The following replacement variables are supported in the template: @@FromAddress@@ (e-mail address of sender), @@FromName@@ (full name of sender), @@Subject@@ (subject of message), @@Text@@ (text of message). The default template is SMSEMailTemplate=@@FromAddress@@ /@@Subject@@ /@@Text@@


--
Des
NowSMS Support
keith watson
New member
Username: Wkdr3d

Post Number: 2
Registered: 02-2009
Posted on Tuesday, February 24, 2009 - 09:39 am:   

Thats great all working now.

And thanks for explaining how to modify its behavour

Regards