[ jonysrb @ 18.03.2009. 12:13 ] @
Imm problem sa kontakt formom. kada posaljem poruku sa servera n mail mi stize prazan mail. Recimo stoji samo Ime: Email: Poruka: ali nevidi mi tekkst koji je unet u input polja u flashu.

Evo kod contact.php
Code:
<?

//name = yourName_txt
//phone = phone_txt
//email = email_txt
//comments = comments_txt


$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'Sa: Web sajta' . "\r\n" .'Reply-To: [email protected]' . "\r\n";



$ToEmail = "[email protected]";

$ToName = "ime sajta";
$ToSubject = "Kontakt sa sajta";

$EmailBody = "<table width='716' height='207' border='1' >
  <tr>
    <td><font size='2' face='Arial' color='#999999'>Poslao: $yourName_txt \nSenders Email: $email_txt\n Message

Sent:\n$comments_txt</font></td>
  </tr>
</table>";

$EmailFooter="\nPoruku poslao: $yourName_txt sa $REMOTE_ADDR ";

$Message = $EmailBody.$EmailFooter;

mail($ToName." <".$ToEmail.">",$ToSubject, $Message, $headers);


Print "_root.Status=success";

?>



ActionScript Cod
Code:
function init()
{
    yourName_txt.tabIndex = 1;
    phone_txt.tabIndex = 2;
    email_txt.tabIndex = 3;
    comments_txt.tabIndex = 4;
    yourName_txt.text = "";
    phone_txt.text = "";
    email_txt.text = "";
    comments_txt.text = "";
    error1 = 1;
    error2 = 1;
    error3 = 1;
    formSuccess = 1;
}
function checkForm()
{
    if (yourName_txt.text == "" || yourName_txt.text == "Mora biti popunjeno!")
    {
        error1 = 1;
        yourName_txt.text = "Mora biti popunjeno!";
    }
    else
    {
        error1 = 0;
    }
    if (comments_txt.text == "" || comments_txt.text == "Mora biti popunjeno!")
    {
        error2 = 1;
        comments_txt.text = "Mora biti popunjeno!";
    }
    else
    {
        error2 = 0;
    }
    whereAT = email_txt.text.lastIndexOf("@");
    whereDOT = email_txt.text.lastIndexOf(".");
    if (whereAT >= whereDOT || whereAT <= 0 || whereDOT <= 0 || email_txt.text == "" || email_txt.text == "email" || email_txt.text == "email required")
    {
        error2 = 1;
        email_txt.text = "Mora biti popunjeno!";
        error3 = 1;
    }
    else
    {
        error3 = 0;
    }
    if (error1 == 0 && error2 == 0 && error3 == 0)
    {
        formSuccess = 0;
    }
}
function giveThanks()
{
    yourName_txt.text = "";
    phone_txt.text = "";
    email_txt.text = "";
    comments_txt.text = "";
    formSuccess = 1;
    gotoAndStop(2);
}
function submit()
{
    checkForm();
    if (formSuccess == 0)
    {
        var _loc1 = new LoadVars();
        _loc1.yourName_txt = yourName_txt.text;
        _loc1.phone_txt = phone_txt.text;
        _loc1.email_txt = email_txt.text;
        _loc1.comments_txt = comments_txt.text;
        _loc1.sendAndLoad("contact/contact.php", _loc1, "POST");
        giveThanks();
    }
}
stop ();
var contactXMLFile = "contact/contactinfo.xml";
var contactXML = new XML();
contactXML.ignoreWhite = true;
contactXML.onLoad = function (success)
{
    if (success)
    {
        contactText = this.firstChild.childNodes[0].firstChild.nodeValue;
        info_txt.html = true;
        info_txt.styleSheet = _parent.txtCSS;
        info_txt.autoSize = "LEFT";
        info_txt.htmlText = contactText;
    }
    else
    {
        var _loc3 = contactXMLFile + " cannot be loaded";
        trace (_loc3);
        info_txt.htmlText = _loc3;
    }
};
contactXML.load(contactXMLFile);
trans_btn.useHandCursor = false;
trans_btn._alpha = 0;
init();
submit_btn.onRelease = function ()
{
    submit();
};
[ Sumenko @ 16.06.2010. 12:46 ] @

Moze li neko da mi pomogne oko jednog flash mailera koji je free i skinuo sam ga sa neta:
Ovo je skripta sa kojom nemogu da se snadjem jer nisam poznavaoc flasha,
ono sto sam ja pokusavao ne ide...ako bi mi neko pomogao i objasnio gde treba
da ubacim tacno i koje podatke ja sam stavljao samo gmail email ali to nije funkcionisalo..
i dali moram da imam email na sajtu da bi ovo radilo ili je dovoljan samo gmail...




function validate(address)
{
if (address.length >= 7)
{
if (address.indexOf("@") > 0)
{
if (address.indexOf("@") + 2 < address.lastIndexOf("."))
{
if (address.lastIndexOf(".") < address.length - 2)
{
return true;
}
}
}
}
return false;
}
function formcheck()
{
if (email == null || email.length < 1 || email == "valid email required")
{
email = "valid email required";
}
if (!validate(email))
{
email = "valid email required";
}
if (name == null || name == "")
{
name = "Please enter your name";
}
if (comments == null || comments == "")
{
comments = "Please enter a comment";
}
if (0 != (phone == null || phone == "") | 0 != phone.length < 10)
{
phone = "Invalid phone number";
}
if (validate(email) && email != "valid email required" && phone != "Invalid phone number" && name != "" && name != "Please enter your name" && comments != "" && comments != "Please enter a comment")
{
comments2 = "Phone: " + phone;
loadVariables("mailer.asp", "_level0", "POST");
loadVariables("mailer.php", "_level0", "POST");
email = "";
subject = "";
comments = name + " your email has been sent, thanks! ";
name = "";
phone = "";
comments2 = "";
}
}
to = "email\'s destination";
siteaddress = " your address here";
sitename = " your sitename here ";
name = "";
subject = "Email from your website";
comments = "";
email = "";
copy = "no";
reply = "copy to";
comments2 = "";
Selection.setFocus("name");
stop();