billy nugz Posted January 16, 2007 Share Posted January 16, 2007 Hey guys let me just stait that im a animator that dables with php.I have a flash based form that I need to email with via smtp. I have read some of the phpmailer tutes on sorce fordge but this mail doesnt seem to be working. So I will post all my code and hope that one of you fine phpers can help.First action script for send button.[code]on (release) { if (!email.length || email.indexOf("@") == -1 || email.indexOf(".") == -1) { EmailProgress = "Please enter a valid E-mail address"; } //else if (!ToEmail.length || ToEmail.indexOf("@") == -1 || ToEmail.indexOf(".") == -1) { // EmailProgress = "Please enter a valid E-mail address that you are sending this to"; //} //else if (!ToName.length) { // EmailProgress = "Please Enter the name of who you are sending this to"; //} else if (!names.length) { EmailProgress = "Please Enter your name before Sending"; } else if (!comments.length) { EmailProgress = "Please enter some text in you message"; } else { loadVariablesNum ("email.php", "0", "Post"); //loadVariablesNum ("basic_mail.asp", "0", "Post"); //getURL ("ASPMail.asp", "", "Post"); EmailProgress = "Thank you. Your message has been sent."; }}[/code]Second the php code[code]<?php/***************************************************\ * PHP 4.1.0+ version of email script. For more * information on the mail() function for PHP, see * http://www.php.net/manual/en/function.mail.php\***************************************************/require("class.phpmailer.php");$mail->IsSMTP(); // set mailer to use SMTP$mail->Host = "smtp.email.ca"; // specify main and backup server$mail->SMTPAuth = true; // turn on SMTP authentication//$mail->Username = "fake"; // SMTP username//$mail->Password = "fake"; // SMTP password$mail->From = "[email protected]";$mail->FromName = "Mailer";$mail->AddAddress("[email protected]");$mail->Subject = "Mail Form";// variables are sent to this PHP page through// the POST method. $_POST is a global associative array// of variables passed through this method. From that, we// can get the values sent to this page from Flash and// assign them to appropriate variables which can be used// in the PHP mail() function.//Process the form data!// and send the information collected in the Flash form to Your nominated email addressif ($action != ""): mail("$adminaddress","Info Request", "A visitor has left the following information\nFirst Name: $names Email: $emailCompany: $companyThe visitor Wrote:------------------------------$commentsLogged Info :------------------------------Using: $HTTP_USER_AGENTHostfname: $ipIP address: $REMOTE_ADDRDate/Time: $date","FROM:$adminaddress"); //This sends a confirmation to your visitormail("$email","Thank You for visiting $sitefname", "Hi $fname,\nThank you for your interest in $sitefname\na member of,$sitefname will contact you shortly.$sitefname$siteaddress","FROM:$adminaddress"); endif;?>[/code]Im very sure im doing things wrong but cant figure out how to do it right any hel would be great. OH ! if there is a easier sulution please let me know, Thanks for all and any help. Link to comment https://forums.phpfreaks.com/topic/34452-flash-phpmailer/ Share on other sites More sharing options...
billy nugz Posted January 17, 2007 Author Share Posted January 17, 2007 bump ? ??? Link to comment https://forums.phpfreaks.com/topic/34452-flash-phpmailer/#findComment-162835 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.