• GoDaddy Community
  • Websites + Marketing | Website Builders
  • Websites + Marketing | Website Builders

    Showing results for 
    Show  only  | Search instead for 
    Did you mean: 
    Go to solution

    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.


    echo "Testing Class PHPmail 3";


    $mail = new PHPMailer();

    $mail->SMTPDebug = 1; // Enable verbose debug output
    $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->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

    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