Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • SMTP Configuration of server

    • 0
    • 3
    • 1
    • 3
    • 0
    • 0
    • 0
    • 0
    • 216
    Comment on it

    If you are using some other server like godaddy or some other server for that you need to put the settings of that particular server in its setting. I am sharing the settings for godaddy server.

    $mail = new PHPMailer();
            $mail->IsSMTP(); // telling the class to use SMTP
            $mail->SMTPAuth = true;                  // enable SMTP authentication
            $mail->SMTPKeepAlive = true;                  // SMTP connection will not close after each email sent
            $mail->Port = 25;                    // set the SMTP port for the YourServer server
            $mail->Host = "smtpout.secureserver.net";         // sets the SMTP server
            $mail->Username = "yourusername@server.com"; // SMTP account username
            $mail->Password = "yourpassword";        // SMTP account password
           $mail->SetFrom('email to be visible to recipient', 'name visible to recipient');
           $mail->Subject = 'Your subject';
            $mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
            $mail->MsgHTML('Your message');
            $mail->AddAddress($email);
            $mail->SMTPDebug = 0;
            $mail->Send();            // Clear all addresses and attachments for next 
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: