Cannot Install Contact_us plugin into Subrion 4.1.1

Discussion in 'Subrion CMS Plugins Discussion' started by Helang_IT, Mar 1, 2017.

  1. Helang_IT

    Helang_IT New Member

    I have downloaded the Contact_us plugin from the subrion website and extracted the zip file to my PC desktop.

    The various tutorials I have found tell me: "Upload all the files from unpacked 'plugin_name' directory to your subrion directory ../plugins/ folder."

    However, I believe this is obsolete as I cannot find a /plugins/ folder in the root of the site.

    The Plugin Manager on the Admin page does invite me to upload a small selection of plugins, but the Contact_us plugin is not amongst them.

    Please kindly advise.
  2. Gleb_S.

    Gleb_S. Subrion Designer Staff Member

  3. Helang_IT

    Helang_IT New Member

    Many thanks. Will do. I'll let you know how it goes.
  4. Helang_IT

    Helang_IT New Member

    All done but I have a couple of problems:

    1) All the text including the "Contact Us" title and the body is white (same colour as the background) therefore invisible

    2) The Map is showing somewhere in Brooklyn USA. I need to change this to a position in Malaysia.

    Any ideas, (bearing in mind I am not a programmer)

    Kind regards

    Andy
  5. Helang_IT

    Helang_IT New Member

    Hi Gleb,

    The custom colours issue fixed the contacts page also.

    However, it is not sending any emails. I think this has something to do with the global email settings. I shall start another thread for that.

    Many thanks again for your help.
  6. Helang_IT

    Helang_IT New Member

    Hi guys,

    Sorry to be so needy. This is my first time using Subrion so I'm still getting to grips with it. I apologise in advance for asking basic questions...

    I have installed the new "contact_us" form. However it does not send mail and I cannot centre the map.

    1) In the admin panel > Extensions > System > email, I have configured SMTP mail using SSL on port 465. I have confirmed the account works in webmail (roundcube) so PHP settings should be okay.

    However when I click the button to "send test email" I get a little red flag that says "undefined". It doesn't say what is undefined however. I tried turning on SMTP debug but it doesn't give any additional information. I'm assuming there must be some server logs somewhere. Unfortnately this entire website (including subrion) is behind cPanel provided by my ISP, so I have no way of accessing the server log files (that I know of).

    There is a field called "default site email". I have put my personal email address in here for testing. The BCC field is blank, but filling this in doesn't make any difference either.

    2) How do I configure the MAP to centre on my desired location? I tried entering Lat and Long coordinates from google into the "config_contact_us_lat" and "config_contact_us_lng" Phrase Fields, using the decimal coordinates provided by Google Maps, but it still stays centered on Brooklyn USA.

    Your experienced help, as always, much appreciated.
  7. Gleb_S.

    Gleb_S. Subrion Designer Staff Member

    Hello @awoolford!

    You are always welcome here and any questions are accepted. We are here to help anyone, despite their Subrion knowledge. So don't apologize :)

    You need to check configuration page for Contact us plugin:
    upload_2017-3-6_9-31-31.png
  8. Gleb_S.

    Gleb_S. Subrion Designer Staff Member

    Have you tried simple `Mail method` ?

    Thanks
  9. Helang_IT

    Helang_IT New Member

    Thanks again.

    I have now fixed the map issue.

    Sending mail is still unresolved. Not sure if this is a problem with the contact_us form or the php mail settings.

    If I go to Admin > Mail and select "php mail" from the drop down menu, then click "Send test email", it briefly displays a little green flag saying " Test email has been received for delivery to "webmaster at helang.....com" . So this should be sent. However nothing is received in that mailbox.

    In any case I would like to change this default receiving email to something else for the contact form.

    The other setting is "sendmail", but this produces an error saying "Could not execute usr/bin/sendmail".

    The final setting is SMTP, which (as I said earlier) produces an error saying "undefined".

    upload_2017-3-6_6-53-19.png
  10. Vasily_B.

    Vasily_B. Project Manager

    Hi,

    The plugin was incompatible with the core 4.1. We've just released an updated version, so you should do the following:
    1. Uninstall your current plugin
    2. Delete the files via ftp
    3. Install new version of contacts plugin.

    It should be ok now. Thanks for the report.
  11. Vasily_B.

    Vasily_B. Project Manager

    This should be related to the global configuration. Email servers are now very restrictive.

    1. Make sure you send from the correct email address. It should be the same domain name you use.
    2. This mailing config is used for all emails sent from the system
    3. Make sure you don't get them - check your spam box

    If php mailing does not work, please try to use SMTP - make sure you use correct server/port/password details.

    Do let us know if you need any assistance.
  12. Helang_IT

    Helang_IT New Member

    Yes I figured the email is probably restricted by the ISP. I was trying to use SMTP and can assure you the SMTP settings are correct (they work via php from roundcube).

    However when I send a test email I get "undefined" error. (red flag dropdown). It doesnt say what is undefined though.

    Your further help would be much appreciated.
  13. Helang_IT

    Helang_IT New Member

    Hi Vasily. Many thanks for the suggestion.

    I have downloaded the new plugin and reconfigured all of the settings. Unfortunately it still is not sending email.

    Also, I noticed that when I click send, it directs me to a blank page, with no info. The URL remains the same https:\\helangflyingacademy.com/contacts/

    I am not sure if the emailing is an issue with the contact_us form or with the Admin -> System -> email configurations. I have tried this setting "phpmail" (which says it sends a test email, but nothing gets through at all), and I have tried SMTP, using a valid email settings which I know work under PHP via roundcube. In this case I get a red flag saying "undefined", but no more information than that.

    I apologise for the overlap, but two threads have now converged. I was having this discussion with your colleague Gleb_S in this installation forum. He suggests this could be a hosting issue, however if this was the case I would not expect Roundcube to work.

    Your further thoughts would be very welcome.

    Regards
  14. Helang_IT

    Helang_IT New Member

    Hi Vasily,

    I have checked all the configurations on the email page and they are correct. My ISP is allowing mail to be sent using PHP, because I have roundcube configured and working. I don't have anything received in my spam, (except spam of course !). ;-)

    I am still getting the "undefined" error. Any idea where can I check mail logs? Being a hosted system, I get FTP access to the webroot and cPanel, that's all.

    <edit> Maybe the "undefined error" is to do with the test button or error flag function in /admin/templates/default/configuration-test-email-btn? I'm not convinced its even trying to send an email...
    Last edited: Mar 6, 2017
  15. Vasily_B.

    Vasily_B. Project Manager

    Hi Andy,

    Decided to merge to posts to avoid confusion and duplication.
    Tripple checked the plugin and it definitely does it job well :) Got a correct notice.
    upload_2017-3-7_11-28-33.png

    And I see the email in my mail server delivery log, so the script worked as expected. We need to dig further.

    Is there any way we can get access to your files & admin dashboard? We would enable phpMailer smtp debug and see if there are any issues.
    Please submit a new ticket with your server details.

    Thanks
  16. Helang_IT

    Helang_IT New Member

    Ticket raised:

    Ticket ID#IOB-956-12486

    Many thanks again

    Andy
  17. Helang_IT

    Helang_IT New Member

    Vasily,

    I have done some more testing regarding this issue as follows. Hope this helps narrow down the problem:

    Global Email Configuration: SMTP (Secure SSL Port 465)

    (SMTP bug tracker switched ON)

    1) Action: Sending a message from the Contact Us form:
    Result: Error on the form Response page:​

    "2017-03-07 15:58:33 Invalid address: (addAnAddress bcc):"

    This seemed to "require" me to add a BCC address in the Global Mail configuration, which I then did.

    2) Action: Sending a form again AFTER adding the BCC address
    Result: Blank Response page, (i.e. no confirmation).​

    3) Action: Sending a Test Email from the Global Mail settings page
    Result: Red Error Flag "Undefined" is displayed briefly​


    Global Email Configuration: PHP Mail

    (After switching the Global Mail configuration to PHP Mail)

    4) Action: Sending a message from the Contact Us form:
    Result: "Message Sent. Thankyou" Response after sending the form, however nothing is received.
    5) Action: Removing the BCC email address and Sending a message from the Contact Us form:
    Result: As above and still nothing is received. (Adding or removing the BCC makes no difference)​

    6) Action: Sending a Test Email from the Global Mail settings page
    Result: Green Success Flag "Message sent to webmaster (at) helang flying academy (dot) com" but still nothing is received.

    (Note: The above Webmaster Address is not the address defined in the "Default Site Email" address of the Global Mail Settings page.)

    I cannot find where this webmaster address is defined as I would wish to change this anyway. I am wondering if there is perhaps a database configuration error or field mismatch?

    What do you think?

    Regards

    Andy
  18. Helang_IT

    Helang_IT New Member

    Hi Vasily,

    Sorry to press you on this... but my client needs the site to go live this week and the contact form is the one function we cannot do without.

    I have done some more testing and written a simple PHP script that tests the PHP mail() function as follows:

    <?php
    $to = 'webform (at) helangflyingacademy.com'; // <– replace with your address here
    $subject = 'Test mail';
    $message = 'Hello! This is a simple test email message.';
    $from = 'webmaster (at) helangflyingacademy.com';
    $headers = 'From:' . $from;
    mail($to,$subject,$message,$headers);
    echo 'Mail Sent.';
    ?>

    When the PHP file is accessed at: https://test.helangflyingacademy.com/testmail.php it will return "Mail Sent" and the mail *IS* delivered to the mailbox at
    webform (at) helangflyingacademy.com. (...and YES I modified the .htaccess file to let this ^ URL through ;-))

    However if I change the TO: address to:
    "myaddress (at) hotmail.com" or
    "webmaster (at) helangflyingacademy.com" (which is forwarded in cPanel to myaddress (at) hotmail.com)

    then the mail is NOT received.

    This might indicate a block at the server level... what do you think?

    I also raised a ticket with the ISP but they are very slow - although the 'sendmail' path is now apparently working (but still no deliveries).

    Ideally I would like to change the site default in the global Mail setting to something else. Whenever I send a test email, it always says "sent to webmaster (at) helangflyingacademy.com" and what I type into the "default site email" or BCC fields seems to make no difference whatsoever.

    Again sorry to be so needy! You guys are great!
  19. Helang_IT

    Helang_IT New Member

    I received confirmation from the ISP that PHP Mail() only sends to local accounts. They suggest using SMTP.

    They have sent me a script that they say works as follows:

    This would imply a problem with the Subrion hooks into SMTP. If we can get that working, then the problem is solved.

    Code (Text):

    <?php
    require_once "Mail.php";

    $from = "Web Master <[email protected]>";
    $to = "Nobody <[email protected]>";
    $subject = "Test email using PHP SMTP\r\n\r\n";
    $body = "This is a test email message";

    $host = "SMTPhostname";
    $username = "[email protected]";
    $password = "yourPassword";
    $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>");
    }
    ?>
     
  20. Helang_IT

    Helang_IT New Member

    Update, I have now tested the site SMTP hooks by running the above script and that seems to work with $host = "locahost"; (and the correct credentials).

    This is a local transaction therefore it happens on port 25 with no encryption.

    https://test.helangflyingacademy.com/testsmtp.php results in "Message successfully sent!" and a message is received by the external destination.

    However, using the same settings in Subrion, the SMTP option in the Global MAIL settings still does not work. (Undefined error) This is now pointing back to the Subrion code...

    Your additional help with this will be much appreciated.

Share This Page