Tutorial | How to send a feedback by email from flash using asp
by Carlos Pinho, February 1st, 2007
  • Share
  • Share

Hi. This is a new issue i think will help you to solve the problem of sending mails trough your website.

On the flash use following code:

//I suppose on this code, using 3 textboxs, one for the name, another from email address, and another for the message.

function check()
{
if (nome.text == “”)
{
nome.text = “*Favor Preencher*”;
} // end if
if (email.text == “”)
{
email.text = “*Favor Preencher*”;
} // end if
if (mensagem.text == “”)
{
mensagem.text = “*Favor Preencher*”;
} // end if
if (nome.text != “*Favor Preencher*” && email.text != “*Favor Preencher*” && mensagem.text != “*Favor Preencher*”)
{
senddata();
} // end if
} // End of the function
function senddata()
{
var _loc1 = new LoadVars();
_loc1.nome = nome.text;
_loc1.email = email.text;
_loc1.mensagem = mensagem.text;
_loc1.load(“sendmail.asp?” + _loc1.toString());
_loc1.onLoad = function ()
{
nextFrame ();
};
} // End of the function
function clean()
{
nome.text = “”;
email.text = “”;
mensagem.text = “”;
} // End of the function
stop ();
bt_clean.onRelease = function ()
{
clean();
};
bt_send.onRelease = function ()
{
check();
};

Now on Asp file:

<%

To = “myname@example.com

smtpserver = “smtp.example.com

subject = “My subject”

email = Request(“email”)

nome = Request(“nome”)

mensagem = Request(“mensagem”)

Set Mail = Server.CreateObject(“Persits.MailSender”) strBody = strBody & “<font face=’Verdana, Arial, Helvetica, sans-serif’ size=’2′ color=’#555555′>” strBody = strBody & “Nome: “strBody = strBody & “<b>” & nome & “</b><br><br>”strBody = strBody & “E-mail: “strBody = strBody & “<b>” & email & “</b><br><br>”strBody = strBody & “Mensagem: <br><br>”strBody = strBody & mensagem & chr(10)strBody = strBody & “</font>”

Mail.Host = smtpserver

Mail.Port = 25 Mail.From = emailMail.FromName = email

Mail.Subject = subject

Mail.Body = strBodyMail.IsHTML = True

Mail.AddAddress To

On Error Resume Next Mail.Send If Err <> 0 Then

Response.Write “popup.mensaje=An error occured. Send your message again. ” & Err.Description

Else

Response.Write “popup.mensaje=Message sent.”

End If Set Mail = Nothing

%>

Now send lots of emails, but don’t spam. lol…

Copy and Paste the code below
Email and IM
Websites
Forums
Get This

No Responses to “Tutorial | How to send a feedback by email from flash using asp”

  1. Domingo Echague Says:

    helpful tip..

  2. James Says:

    Tutorial How to send a feedback by email from flash using asp – This doesnt work!! Do I need to change something somewhere?
    Thanks

Let leave a Comments for this post.