Paul.


This the script perl used to send a post to sendmms:

----------------------------------------------------------------------
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
my %hash = (
                username => 'mbuni',
                password => 'mbuni',
                from => "XXX",
                to => "XXXXXXXXXXXX",
                subject => "SubjectPOST",
                text => "TextoPOST",
);

my $response = $ua->post('http://localhost:13501/', \%hash, 'Content-type' => 'application/vnd.wap.mms-message', host => 'XX.XX.XX.XX' );

if ($response->is_success) {
        print $response->content;  # or whatever
} else {
        die $response->status_line;
}
--------------------------------------------------


This the mbuni log:

2006-06-06 12:57:15 [22839] [2] DEBUG: HTTP: Creating HTTPClient for `127.0.0.1'.
2006-06-06 12:57:15 [22839] [4] DEBUG: HTTP: Destroying HTTPClient area 0xa10e760.
2006-06-06 12:57:15 [22839] [4] DEBUG: HTTP: Destroying HTTPClient for `127.0.0.1'.
2006-06-06 12:57:15 [22839] [4] ERROR: MMSBox: SendMMS, Authentication failed, username=(null), password=(null)!


Someone already used, with POST request? Could send me a example?


[]s
Allison Almeida.


2006/6/6, Paul Bagyenda <[EMAIL PROTECTED]>:
Are you setting the username/password? Please send through some logs.
On Jun 06, 2006, at 03:02, Allison Almeida wrote:

Hi Paul.


I'm trying to send a POST to sendmms port of vasgw without success.

I set the content-type, like below, but continue receive a Autentication Failed error.

Could you send me a example of POST request with success return?

[]s

Allison Almeida



Re: [Users] Sending MM through VASGW

Paul Bagyenda
Wed, 31 May 2006 22:35:34 -0700

Hi Pedro,

Glad to hear it worked fine. Answers to your questions below
On Jun 01, 2006, at 00:49, Pedro Miguel Duque wrote:

> Hi all,
>
> I've installed mmsbox succesfully using eaif and now i can send MMS's
> using text and smil parameters in a wget request like:
>
> wget
> "http://localhost:13501 ?
> username=mbuni&password=mbuni&from=940&to=x&subj
> ect=teste&smil=
> >> name=\"author\" content=\"MMS\" />
> height=\"160\" />> left=\"0\" top=\"0\" />
> left=\"0\" top=\"120\" />> src=""
http://www.portugalmaispositivo.com/files/images/
> Porto.thumbnail.j
> pg\" region=\"Image\" />"
>
> I found a problem sending a message if there are spaces in the URL
> like:
>


Yep! Oldest problem in the book. You need to 'url encode' the part
that contains spaces. This is not a Mbuni problem, it is a general
problem with an URL based application.


> wget
> "http://localhost:13501?
> username=mbuni&password=mbuni&from=940&to=x&subj
> ect=teste&smil=
> >> name=\"author\" content=\"MMS\" />> height=\"160\" />
> left=\"0\" top=\"0\" />> left=\"0\" top=\"120\" />

> src="" rel="nofollow" href="http://www.portugalmaispositivo.com/files/images/Queijo%20da%25" target="_blank" >http://www.portugalmaispositivo.com/files/images/Queijo%20da%
> 20Ser
> ra.thumbnail.JPG\" region=\"Image\" />"
>
> I believe that mbuni translate the spaces before the request...
>
> Now, my question is: can I send mms files using the mmsbox? If i
> have a
> message application/vnd.wap.mms-message how can I send it through
> mmsbox?
>


The send-mms port can also process HTTP POST requests. The above is
what is known as a GET request, and with this form, only text and
SMIL are supported. But if you can write a script (Perl, PHP, etc)
that can do an HTTP POST to the Mbuni send-mms port, set the content
type as application/vnd.wap.mms-message and Mbuni will handle the mms
file content correctly. (Of course it handles other content types as
well: text/plain is treated as text image/* as image, application/
smil as SMIL.)



> thank you,
> Pedro Duque
>
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://mbuni.org/mailman/listinfo/users_mbuni.org


_______________________________________________
Users mailing list
[email protected]
http://mbuni.org/mailman/listinfo/users_mbuni.org


--



Abraços.

Allison Almeida.

_______________________________________________
Users mailing list


_______________________________________________
Users mailing list
[email protected]
http://mbuni.org/mailman/listinfo/users_mbuni.org





--



Abraços.

_______________________________________________
Users mailing list
[email protected]
http://mbuni.org/mailman/listinfo/users_mbuni.org

Reply via email to