Skip to content
Advertisement

How can I remove the promotional footer my hosting provider adds to emails?

How do I get rid of this footer in my messages?

enter image description here

    require ('PHPMailerAutoload.php');

    $mail = new PHPMailer;

    // Form Data
    $name = $_REQUEST['name'] ;
    $subject = $_REQUEST['subject'] ;
    $email = $_REQUEST['email'] ;
    $message = $_REQUEST['message'] ;

    $mailbody = 'Information' . PHP_EOL . PHP_EOL .
                'Name : ' . $name . '' . PHP_EOL .
                'E-mail Address : ' . $email . '' . PHP_EOL .
                'Message : ' . $message . '' . PHP_EOL;

    // $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 = 'sample@gmail.com'; // SMTP username
    $mail->Password = 'xxxxxxxxxxx'; // SMTP password
    $mail->SMTPSecure = 'ssl'; // Enable TLS encryption, `ssl` also accepted
    $mail->Port = 587; // TCP port to connect to


    $mail->setFrom('sample@gmail.com', 'WebMaster'); // Admin ID
    $mail->addAddress('sample@gmail.com', 'Admin'); // Business Owner ID
    $mail->addReplyTo($email, $name); // Form Submitter's ID

    $mail->isHTML(true); // Set email format to HTML

    $mail->Subject = $subject;
    $mail->Body    = $mailbody;

    // $mail->send();

    if(!$mail->send()) {
        echo 'Message could not be sent.';
        echo 'Mailer Error: ' . $mail->ErrorInfo;
    } else {
        echo 'Message has been sent';
    }

Advertisement

Answer

You are using free hosting so you cannot remove this.

This advertisement is automatically attached by the hosting providers as you use their hosting. Its better to use a paid hosting or try free trials of GOOGLE CLOUD/AWS/MICROSOFT AZURE

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement