Loading...
 
Features / Usability

Features / Usability


cant send registration email

posts: 3665 United States

Brand new 1.9.2 install... Trying to register as a new user. After completing the tiki-register.php page,

I get the following messages/errors:

The registration mail can't be sent. Contact the administrator
Notice: Only variable references should be returned by reference in ../lib/webmail/htmlMimeMail.php on line 402


Line 402 of htmlMimeMail.php is:
return new Mail_mimePart($text, $params);


I have selected both options on the Admin : Login page.

  • Users can register:
  • Validate users by email:



I wrote a quick PHP program to test the sendmail function and it worked fine. What's up?

TIA,

-Rick

posts: 1092

The best is to put a debug print in lib/webmail/htmlMimeMail.php in the function send. Just after the call to the mail function to see if it is this function that doesn't work
Good luck
sylvie

posts: 3665 United States

Thanks. What exactly is a debug print?

In the function send(), near the end is:


Image
Copy to clipboard
// Send it if (!$smtp->send($send_params)) { $this->errors = $smtp->errors; return false; }


After the return false I put debug print;, but now I get a PHP parsing error?

You'll need to go slow with me...

I'm running PHP 4.4.1 and I have confirmed that the @mail() function works fine. I just can't get TIKI to send any email notifications.

> The best is to put a debug print in lib/webmail/htmlMimeMail.php in the function send. Just after the call to the mail function to see if it is this function that doesn't work
> Good luck
> sylvie

posts: 1092

Sorry, As I see your name often, I took the short way ;-)
a debug print in my bad English means to print something to see if the culprit is here or no
So in line 699 of the htmlMimeMail.php, I would insert
if ($result) echo "ok"; else echo "wrong";
Like this you will know a little more .. Is it the encodage? Is it far before ?

posts: 3665 United States

No problem. My French is probably worse than your English.

The debug line is reporting wrong. So there is definately something wrong with the function send($recipients, $type = 'mail') right?

Is there anything in my configuration that I can check?

  • TIKI 1.9.2
  • PHP Version 4.4.1


posts: 1092

> The debug line is reporting wrong. So there is definately something wrong with the function send($recipients, $type = 'mail') right?
yes

You can check in the snedmail log usually at /var/log/maillog. Perhaps you will find something

The best is to try to reproduce the problem outside tikiwiki. You said you already check a mail call outside tw. So now you have to try with the same params. Perhaps something is wrong with the headers - it is always the tricky part of the mail.
pick up the param from your htmlmimemail file
echo "TO:$toSUBJECT:$subjectOUTPUT:$this->outputHEADER".implode(CRLF, $headers);

Create a new file php by replacing the variable by the values you got
mail($to, $subject, $output, $headers);


posts: 3665 United States

Maybe I'm getting closer. After adding the echo statement, this gets dumped to the console window:

Image
Copy to clipboard
wrong TO:myemail@mydomain.org /n SUBJECT: Your Tiki information registration (www.mydomain.org) /n OUTPUT:MIME-Version: 1.0 From: automated_mailer@mydomain.org Return-Path: < Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-ID:


And that's it. There is nothing after Message-ID:. So where's the message? Or does the echo statment simply truncate the output?

I added a straight @mail() directly to tiki-register.php it it works fine. So the probably is definately in the htmlmimemail file. But as I said, I'm using a brand-new 1.9.2 install... I can't think of anything I've done to break it :-(


posts: 3665 United States

SIGH..... another "operator error".... confused

I had forgotten to create a mail address for my automated mailer return address. As soon as I created the email address, everything started working. Thanks again.