Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9170811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:04:43+00:00 2026-06-17T16:04:43+00:00

I’m trying since hours now to get a mailscript working on a live server.

  • 0

I’m trying since hours now to get a mailscript working on a live server. It works as intended on my localhost.

I’m using exact the same external SMTP server, the same PHP sources and the same databasetables too. The PHP version and MySQL version online and localhost are identical.

I tested everything. Everything works as pretended without the physical sending process. It doesn’t send (or receive) email. I also went to the systemadministrator to let him check if there are any emails blocked or internal server errors, but here also everything fine.

I really tried everything I could think of but I didn’t find the problem. Has anybody an idea what I could try next?

This is how the function for the physical sending looks like:

private function sendPhysical($sReciepient) {
    if ($oSmtpIn = fsockopen(SMTPSERVER, SMTPPORT)) {
        fputs($oSmtpIn, "EHLO " . SMTPSERVER . "\r\n");
        $aCodes["hello"] = fgets($oSmtpIn, 1024);

        fputs($oSmtpIn, "auth login\r\n");
        $aCodes["res"] = fgets($oSmtpIn, 1024);

        fputs($oSmtpIn, $this->encodeUser() . "\r\n");
        $aCodes["user"] = fgets($oSmtpIn, 1024);

        fputs($oSmtpIn, $this->encodePassword() . "\r\n");
        $aCodes["pass"] = fgets($oSmtpIn, 256);

        fputs($oSmtpIn, "MAIL FROM: <" . $this->sFrom . ">\r\n");
        $aCodes["From"] = fgets($oSmtpIn, 1024);

        fputs($oSmtpIn, "RCPT TO: <" . $sReciepient . ">\r\n");
        $aCodes["To"] = fgets($oSmtpIn, 1024);

        fputs($oSmtpIn, "DATA\r\n");
        $aCodes["data"] = fgets($oSmtpIn, 1024);

        fputs($oSmtpIn, $this->generateHeader($sReciepient) . "\r\n\r\n" . $this->returnCompiledTemplate() . "\r\n.\r\n");
        $aCodes["send"] = fgets($oSmtpIn, 256);

        fputs($oSmtpIn, "QUIT\r\n");
        fclose($oSmtpIn);
    } else {
        $aCodes["connection"] = false;
    }
    return $aCodes;
}

Anybody a possible solution? I’m totally confused because it works at localhost and it already worked at the online server until last week…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T16:04:43+00:00Added an answer on June 17, 2026 at 4:04 pm

    It’s quite tricky too see what’s wrong on with this block of code but if you don’t want to have much trouble sending mail via php, try PHPMailer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
this is what i have right now Drawing an RSS feed into the php,
I am using JSon response to parse title,date content and thumbnail images and place
I am trying to render a haml file in a javascript response like so:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.