• GoDaddy Community
  • GoCentral | Website Builder
  • GoCentral | Website Builder

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    Go to solution
    New

    PHPMailer for sending mail

    Hi, I want to use PHPmailer on my cpanel linux. Do I need to install it as a package or it is installed by default?

    If it is installed what is it path so I can use it inside my php program?

    If it is not installed, is there any document on how to install it on Godaddy cpanel?

    Thanks and regards,

    I have already tried the code below but did not work and did not give any errors either.

    <?php

    echo "Testing Class PHPmail 3";

    require("class.phpmailer.php");

    $mail = new PHPMailer();

    $mail->SMTPDebug = 1; // Enable verbose debug output
    $mail->isSMTP();
    $mail->Host = "relay-hosting.secureserver.net";
    $mail->Port = 25;
    $mail->SMTPSecure = "none";
    $mail->SMTPAuth = false;
    $mail->Username = "";
    $mail->Password = "";

    $mail->From = "info@sa3at-soujoud.com";

    $mail->AddAddress("info@luxurylebanon.com");

    $mail->Subject = "First PHPMailer Message";
    $mail->Body = "Hi! \n\n This is my first e-mail sent through PHPMailer.";
    $mail->WordWrap = 50;

    if(!$mail->Send()) {
    echo 'Message was not sent.';
    echo 'Mailer error: ' . $mail->ErrorInfo;
    } else {
    echo 'Message has been sent.';
    }
    ?>

    2 REPLIES 2
    Moderator
    Moderator
    Solution

    Re: PHPMailer for sending mail

    Hi @eyatmr

    Please refer to this help article

    KayJay - GoDaddy | Community Moderator
    24/7 support available at x.co/247support

    Re: PHPMailer for sending mail

    You didn't answer his question correctly. We want to use PHPmailer. It works way better than the PHP mail() function