No sending mails

Hi,
yes it's working before and after the changes in the lm_prefs.php document, I have access to login page. I turned on debugging mode and I get this message :
Notice: Undefined variable: smtp in /home/insta129/public_html/mailing/lm/lm_functions.php on line 2112

Fatal error: Call to a member function send() on null in /home/insta129/public_html/mailing/lm/lm_functions.php on line 2112

this line is : $mail = $smtp->send( $to, $headers, $body );
does it ring a bell to you ?
 
Hi, thanks for the link but it's about a script to test if it's working and this script is exactly the same as the one I posted previously on this thread and it was made my ISP to test that everything was fine and it worked. I don't understand a thing about php coding and I am not interested in it. That's why I bought the software, to make things simple. Now we can't have any subscriber since last Christmas because we need a secure connection. Why is that so complicated to make it work ? The link to this page is giving me a script, where do I have to put it? Paste it in the lm_prefs document ? Where ? I really don't know how this is working so any help will me appreciated, the software is no use to us without the possibility to subscribe somehow.
thanks
Samuel
 

stanbusk

Administrator
Staff member
I sent you that link for you to test, that's all. This is part of troubleshooting. Now you say that script works for you? ... or you did not test it yourself? I am just trying to understand why what works for everybody doesn't for you. Note that I wrote MLM, the script is provided for free and the code is open. I did not wrote PEAR, I just give support to PEAR using the provided standard PEAR code. If PEAR doesn't work maybe you should ask your server support. As I say I use the standard code, nothing fancy.

--
Follow maxprog.com on Facebook | Google+ | Linkedin | Twitter | YouTube
and keep up-to-date with the latest Max Programming updates!
 
Hi,
thanks for your reply. Yes that code is working but I didn't do it myself because I don't know where to put it or paste it, it's somebody from my server support that did the test to check if the connection with PEAR was ok and they said it was. So know I don't know what to do with that information.
 

stanbusk

Administrator
Staff member
If you did not test that code yourself you can't know for sure it works. Forget about what your server admin said and do the test yourself. This is part of troubleshooting.

To test the code it is simple, copy/paste it to a text file, edit the $from, $to, $host, $username and $password. Name the file 'test.php', upload it to your server and then open that file with your browser. Does it send the message? Do you receive that message?

The code I am talking about is:

Code:
<?php
require_once "Mail.php";

$from = "Sandra Sender <[email protected]>";
$to = "Ramona Recipient <[email protected]>";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";

$host = "mail.example.com";
$username = "smtp_username";
$password = "smtp_password";

$headers = array ('From' => $from,
  'To' => $to,
  'Subject' => $subject);
$smtp = Mail::factory('smtp',
  array ('host' => $host,
    'auth' => true,
    'username' => $username,
    'password' => $password));

$mail = $smtp->send($to, $headers, $body);

if (PEAR::isError($mail)) {
  echo("<p>" . $mail->getMessage() . "</p>");
 } else {
  echo("<p>Message successfully sent!</p>");
 }
?>
 
Hi,
i did the test myself with the code you send me and it's working fine, I did receive the message by mail.
I tried to understand what's wrong but I don't. When smtp auth is set to "false", I get the message :
host smtp.antispamcloud.com [38.89.254.150]
SMTP error from remote mail server after end of data:
550 From contains invalid characters.
Reporting-MTA: dns; hp235.hostpapa.com

Action: failed
Final-Recipient: rfc822;[email protected]
Status: 5.0.0
Remote-MTA: dns; smtp.antispamcloud.com
Diagnostic-Code: smtp; 550 From contains invalid characters.

and when I set it to "true" I have this message on the browser :
Undefined variable: smtp in /home/insta129/public_html/mailing/lm/lm_functions.php on line 2112
 
Hi, I have lots of document where I have $from inside, in which one do you mean ? All the documents I have are the one that have been uploaded by the software, I didn't touch anything inside it, except for the smtp authentification.
 
Hi,
no it must have been an automatic change of the form, it's a real address with no *, it must have been automatically replaced.
 
Hi,
yes I tried to change that address, I check password and ID, they are working and when somebody want to subscribe on our website, I still get the message:
Notice: Undefined variable: smtp in /home/insta129/public_html/mailing/lm/lm_functions.php on line 2112
Fatal error: Call to a member function send() on null in /home/insta129/public_html/mailing/lm/lm_functions.php on line 2112
 

stanbusk

Administrator
Staff member
In 'lm_prefs.php' turn debugging off by setting '$mlm_debug' to false.
Code:
// -- Debugging ----------------------------------------------------------------

$mlm_debug = false;                   // Activate or deactivate the debug mode
What you get is not an error but a n notification.

--
Follow maxprog.com on Facebook | Google+ | Linkedin | Twitter | YouTube
and keep up-to-date with the latest Max Programming updates!
 
Hi,
I did turn to false but I have a white page instead, and subscription is not working, I din't receive the confirmation mail or anything like that.
 
Top