Jump to content

teitoklein01

Members
  • Posts

    19
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

teitoklein01's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. don't mind the line comments like "//gmail username" becase it is not a gmail.. it is my own mail server. but i cant authenticate
  2. I downloaded the PHPMailer. I can send email from gmail mail server to the registered users in my website smoothly. But when I upload it to my web host basically I edited all the credentials and apply my new host mail server username, password, host, port, etc. When i try to send this is the error: SMTP Error: Authentication Failed and this is my code <?php session_start(); ?> <html> <head> <title>PHPMailer - SMTP (Gmail) basic test</title> </head> <body> <form action="GET"> <?php $pEmail = $_SESSION['uEmail']; $pUser = $_SESSION['user']; $eTitle = $_SESSION['uTitle']; $eDesc = $_SESSION['uDesc']; $ePrice = $_SESSION['uPrice']; //error_reporting(E_ALL); error_reporting(E_STRICT); //date_default_timezone_set('America/Toronto'); require_once('class.phpmailer.php'); //include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded $mail = new PHPMailer(); //$body = file_get_contents('contents.php'); //$body = eregi_replace("[\]",'',$body); $body = "Welcome to GankGames, ".$pUser. "<br><br> Your Game has been uploaded successfully!<br><br> Below is the summary of your upload transaction: <br><br> Game Name: ".$eTitle."<br> Game Description: ".$eDesc."<br> Game Price: ".$ePrice."<br><br> Your game will be verified in 24 hours for security purposes. After verifying we will going to send you again an email informing you that your game is already active <br><br><br> Thank you very much!!"; $mail->IsSMTP(); // telling the class to use SMTP $mail->SMTPDebug = 2; // enables SMTP debug information (for testing) // 1 = errors and messages // 2 = messages only $mail->SMTPAuth = true; // enable SMTP authentication $mail->SMTPSecure = "ssl"; // sets the prefix to the servier $mail->Host = "mail.********.com"; // sets GMAIL as the SMTP server $mail->Port = 465; // set the SMTP port for the GMAIL server $mail->Username = "gankgames@almarioit115p.com"; // GMAIL username $mail->Password = "*********"; // GMAIL password $mail->SetFrom('mail.********.com', 'admin@gankgames.com'); //$mail->AddReplyTo("teitoklein01@gmail.com","jm"); $mail->Subject = "Game Verification"; //$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test $mail->MsgHTML($body); $address = $pEmail; $mail->AddAddress($address, $pUser); //$mail->AddAttachment("images/phpmailer.gif"); // attachment //$mail->AddAttachment("images/phpmailer_mini.gif"); // attachment if(!$mail->Send()) { echo "Mailer Error: " . $mail->ErrorInfo; } else { //echo "Message sent!"; //$_SESSION['uploaded'] = "Uploaded Successfully"; $upload = "Uploaded Successfully"; ob_start(); header("Location: confirm.php?pupload=$upload"); ob_end_flush(); } ?> </form> </body> </html> help
  3. We have a website that allows the user to upload his/her picture so we use the ftp_put() command. I use <?php $path = getcwd(); echo $path; ?> This is the output: /home/vol10/000a.biz/a000b_7363341/htdocs/gankgame to determine the absolute path where my website is stored. My website "CAN" connect to the ftp server but it can't upload files. Uploading always fail. I can't determine the right path. "My code is attached" [attachment deleted by admin]
  4. OK! please delete this post. I'm sorry. I already sovled it . thank you very much for the replies
  5. ahhhh . im sorry im new in this forum. ha ha ! BTW I already solved it . thanks for the replies. just a noob mistake from me.
  6. I have a registration form on my website and after Registration I want the user to activate first his account. I don't have problem on sending this email to the user. What I want to appear is like this.. GoodDay "username", Blah Blah! how can you actually do that? I know that you can do that through session variables but the thing is email's can't accept scripts on sending emails. how can I get the value from a session variable for example and convert it to plain html text so that i can OUTPUT it to the email.. HELP PLEASE!
  7. what? I don't get . it's not related to what i'm asking
  8. I have a page which contains php scripts for the values that will be send through email. my problem is when i send it, it doesn't read the php script. The body only read plain html text. how can I output my php script values through html
  9. This is my code on contents.html and I will just include it to my send.php This is the actualy data that will be displayed on the body of the message.. <?php session_start(); ?> <body style="margin: 10px;"> <div style="width: 640px; font-family: Courier New; font-size: 11px;"> <div align="center"><img src="images/gamebanner2.png" style="height: 90px; width: 340px"></div><br> <br> <?php $eUser = $_SESSION['user']; $eTitle = $_SESSION['uTitle']; $eDesc = $_SESSION['uDesc']; $ePrice = $_SESSION['uPrice']; echo "Welcome to GankGame, ".$eUser; ?> </br></br> Your Game has been uploaded successfully!!<br><br> Below is the summary of your upload transaction: <br><br><br> <?php echo "Game Name: ".$eTitle."</br>"; echo "Game Description: ".$eDesc."</br>"; echo "Game Price: ".$ePrice."</br>"; ?> <br><br> Your game will be verified in 24 hours for security purposes. After verifying we will going to send you again an email informing you that your game is already active <br><br><br> Thank you very much!!<br> <a href "www.gmail.com">admin@gankgames.com</a><br> <?php echo date("Y/m/d") . "<br />"; unset($_SESSION['uTitle']); unset($_SESSION['uPrice']); unset($_SESSION['uDesc']); ?> <br> </div> </body>
  10. I am using Gmail as my mail server in my website. Im not having problems sending emails to my clients but my only problem is that Gmail and other mail servers like yahoo, hotmail, etc. can't detect php scripts? What am i going to do? How can I pass values that I will send to them.
  11. yEAH THANKS! I already figured it out. he he he . It is just a matter of being a noob php programmer. I also finished encrpyting it using Password hashing. and it definitely a package for security and validation. Thanks for inspiring me .
  12. Our professor in PHP Programming is very choosy that he requires us to verify if the user enter the UPPERCASE format of the user name registered the program will show an invalid user. What he's trying to say is the user must enter a 100% identical to the username he registered. If the username registered is LOWERCASE he must enter a LOWERCASE username if the username registered is UPPERCASE he must enter an UPPERCASE username to LOGIN. :'(
  13. Hmm, The thing is I don't have any problem uploading my files(images, php, sprites, css, etc) on the web host we've chosen. The problem we were encountering is when the user upload on user-side. because we had a module in the website wherein user can upload his/her own file. and other user can download that.. If i can't get the relative path where my files are located I can't succeed ftp_put and ftp_get.
  14. ammm what i mean is uploading a file user-side. through ftp_put() function.
  15. After a week, we finally finished our website and we want to upload it to a free web host. We choose www.000a.biz web host. It was stated in the control panel that the home path is /home/vol10/000a.biz/a000b_7363341/ --> based on my observation i think it is a absolute path.. I am having problems when i put this to the "destination_file" parameter of the ftp_put(). my relative path when im doing this on a local host is gankgame/images/$myPic How can i know the relative path of the given 'Home path' of my web host. is the file actually being stored their? What will I do. help please
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.