Groups | Blog | Home
all groups > macromedia flash flash remoting > september 2004 >

macromedia flash flash remoting : need help with email application


Roger Lek
9/28/2004 10:24:49 PM
Hi guys,
I've been trying to make a flash email app with flash remoting and asp.net
but it keeps giving me the following error when i run it:


The "SendUsing" configuration value is invalid.

My flash app consists of 4 input textboxes -- From, to, subject and
message -- and 1 submit button. I've placed the following actionscript in
the 1st frame of the main timeline:


//////////////////////////////////code/////////////////////////////////////////////
#include "NetServices.as"

gwUrl = "http://localhost/test/gateway.aspx"
NetServices.setDefaultGatewayUrl(gwUrl);
conn = NetServices.createGatewayConnection();

res = new Object();

res.onResult = function( result )
{
_root.result_txt.text = result;}

res.onStatus = function( status )
{
_root.result_txt.text = status.description;
}

svr = conn.getService( "test" );

submit_btn.onRelease = function()
{
_root.svr.SendEmail( res, from_txt.text, to_txt.text, sbj_txt.text,
body_txt.text );
}
/////////////////////////////////////////////////////////////////////////////////////

Then, I've created a asp.net which handles the user's inputs. The codes is
as below:

//////////////////////////////////codes///////////////////////////////////////
<%@ Page Language="VB" Debug="true" %>
<%@ Register TagPrefix="MM" Namespace="FlashGateWay" Assembly="flashgateway"
%>
<%@ import Namespace="System.Web.Mail" %>
<script runat="server">

Sub Page_Load( Sender as Object, E as EventArgs )
If Not Page.IsPostBack Then
Dim TheMailMessage as New MailMessage
Dim TheMailConnection as SmtpMail
Dim fromStr as String
Dim toStr as String
Dim sbjStr as String
Dim bdyStr as String

If flash.Params.Count > 0 Then
fromStr = flash.Params(0).ToString()
toStr = flash.Params(1).ToString()
sbjStr = flash.Params(2).ToString()
bdyStr = flash.Params(3).ToString()
TheMailMessage.From = fromStr
TheMailMessage.To = toStr
TheMailMessage.Subject = sbjStr
TheMailMessage.Body = bdyStr
TheMailConnection.Send(TheMailMessage)

flash.Result = fromStr & " " & toStr & " " & sbjStr & " " &
bdyStr
End If
End If
End Sub

</script>
<html>
<head>
</head>
<body>
<form runat="server">
<MM:Flash id="flash" runat="server" />
</form>
</body>
</html>
//////////////////////////////////////////////////////////////////////////////////////
I have absolutely no idea what's wrong with my program. This is urgent...pls
help.Thanks in advance.


Roger Lek
10/1/2004 1:57:55 PM
So nobody knows wat's wrong with the program? Come on...don't be shy. I'm
sure most of you have done this before. Please help. This is really urgent.
Or if you find that going thru my codes is too tedious for you, maybe you
can tell me where to find the source codes for a working flash email
application build with flash remoting and asp.net. Any help is really
appreciated. Once again, thanks in advance.

AddThis Social Bookmark Button