Menu

#341 cannot send mail

open
nobody
None
1
2013-03-19
2013-03-19
Anonymous
No

sorry for bad language
i am new on mrbs
i try to set mail
but it does not work
no admin mail, no booker mail

you said
' Have you got all this before the lines
// IMPORTANT NOTE: Do NOT put any configuration apart from the "Entry Types"
// below this section
require_once "language.inc"; // DO NOT DELETE THIS LINE
in your config file?
but i do not understand, i found ' require_once "language.inc"; ' in defaultincludes.inc

many thanks for help, your system is great

1 Attachments

Discussion

  • Campbell Morrison

    Which version of MRBS are you using?

    Campbell

     
  • Campbell Morrison

    The comments you quoted (about language.inc) refer to an old version of MRBS, so you can ignoire them.

    Can you post your mail settings ($mail_settings) from your config file? Don't forget to remove any passwords and usernames etc.

    Campbell

     
  • Anonymous

    Anonymous - 2013-03-19

    in my config.inc.php

    /*******
    * Email settings
    *******/

    // WHO TO EMAIL
    // ------------
    // The following settings determine who should be emailed when a booking is made,
    // edited or deleted (though the latter two events depend on the "When" settings below).
    // Set to TRUE or FALSE as required
    // (Note: the email addresses for the room and area administrators are set from the
    // edit_area_room.php page in MRBS)
    $mail_settings['admin_on_bookings'] = TRUE; // the addresses defined by $mail_settings['recipients'] below
    $mail_settings['area_admin_on_bookings'] = TRUE; // the area administrator
    $mail_settings['room_admin_on_bookings'] = TRUE; // the room administrator
    $mail_settings['booker'] = TRUE; // the person making the booking
    $mail_settings['book_admin_on_approval'] = TRUE; // the booking administrator when booking approval is enabled
    // (which is the MRBS admin, but this setting allows MRBS
    // to be extended to have separate booking approvers)

    // WHEN TO EMAIL
    // -------------
    // These settings determine when an email should be sent.
    // Set to TRUE or FALSE as required
    //
    // (Note: (a) the variables $mail_settings['admin_on_delete'] and
    // $mail_settings['admin_all'], which were used in MRBS versions 1.4.5 and
    // before are now deprecated. They are still supported for reasons of backward
    // compatibility, but they may be withdrawn in the future. (b) the default
    // value of $mail_settings['on_new'] is TRUE for compatibility with MRBS 1.4.5
    // and before, where there was no explicit config setting, but mails were always sent
    // for new bookings if there was somebody to send them to)

    $mail_settings['on_new'] = TRUE; // when an entry is created
    $mail_settings['on_change'] = TRUE; // when an entry is changed
    $mail_settings['on_delete'] = TRUE; // when an entry is deleted

    // WHAT TO EMAIL
    // -------------
    // These settings determine what should be included in the email
    // Set to TRUE or FALSE as required
    $mail_settings['details'] = TRUE; // Set to TRUE if you want full booking details;
    // otherwise you just get a link to the entry
    $mail_settings['html'] = TRUE; // Set to true if you want HTML mail
    $mail_settings['icalendar'] = TRUE; // Set to TRUE to include iCalendar details
    // which can be imported into a calendar. (Note:
    // iCalendar details will not be sent for areas
    // that use periods as there isn't a mapping between
    // periods and time of day, so the calendar would not
    // be able to import the booking)

    // HOW TO EMAIL - LANGUAGE
    // -----------------------------------------

    // Set the language used for emails (choose an available lang.* file).
    $mail_settings['admin_lang'] = 'th'; // Default is 'en'.

    // HOW TO EMAIL - ADDRESSES
    // ------------------------
    // The email addresses of the MRBS administrator are set in the config file, and
    // those of the room and area administrators are set though the edit_area_room.php
    // in MRBS. But if you have set $mail_settings['booker'] above to TRUE, MRBS will
    // need the email addresses of ordinary users. If you are using the "db"
    // authentication method then MRBS will be able to get them from the users table. But
    // if you are using any other authentication scheme then the following settings allow
    // you to specify a domain name that will be appended to the username to produce a
    // valid email address (eg "@domain.com").
    $mail_settings['domain'] = '@bunga.pn.psu.ac.th';
    // If you use $mail_settings['domain'] above and username returned by mrbs contains extra
    // strings appended like domain name ('username.domain'), you need to provide
    // this extra string here so that it will be removed from the username.
    $mail_settings['username_suffix'] = '';

    // HOW TO EMAIL - BACKEND
    // ----------------------
    // Set the name of the backend used to transport your mails. Either 'mail',
    // 'smtp' or 'sendmail'. Default is 'mail'.
    $mail_settings['admin_backend'] = 'mail';

    /***
    * Sendmail settings
    */

    // Set the path of the Sendmail program (only used with "sendmail" backend).
    // Default is '/usr/bin/sendmail'
    $sendmail_settings['path'] = '/usr/bin/sendmail';
    // Set additional Sendmail parameters (only used with "sendmail" backend).
    // (example "-t -i"). Default is ''
    $sendmail_settings['args'] = '';

    /***
    * SMTP settings
    */

    // These settings are only used with the "smtp" backend
    $smtp_settings['host'] = 'localhost'; // SMTP server
    $smtp_settings['port'] = 25; // SMTP port number
    $smtp_settings['auth'] = TRUE; // Whether to use SMTP authentication
    $smtp_settings['username'] = ''; // Username (if using authentication)
    $smtp_settings['password'] = ''; // Password (if using authentication)

    // EMAIL - MISCELLANEOUS
    // ---------------------

    // Set the email address of the From field. Default is 'admin_email@your.org'
    $mail_settings['from'] = 'abdulaziz-d@bunga.pn.psu.ac.th';

    // Set the recipient email. Default is 'admin_email@your.org'. You can define
    // more than one recipient like this "john@doe.com,scott@tiger.com"
    $mail_settings['recipients'] = '';

    // Set email address of the Carbon Copy field. Default is ''. You can define
    // more than one recipient (see 'recipients')
    $mail_settings['cc'] = '';

    // Set to TRUE if you want the cc addresses to be appended to the to line.
    // (Some email servers are configured not to send emails if the cc or bcc
    // fields are set)
    $mail_settings['treat_cc_as_to'] = TRUE;

    // The filename to be used for iCalendar attachments. Will always have the
    // extension '.ics'
    $mail_settings['ics_filename'] = "booking";

    // Set this to TRUE if you want MRBS to output debug information to the browser
    // when you are sending email. If you are not getting emails it can be helpful
    // by telling you (a) whether the mail functions are being called in the first place
    //(b) whether there are addresses to send email to and (c) the result of the mail
    // sending operation.
    $mail_settings['debug'] = TRUE;
    // Set this to TRUE if you do not want any email sent, whatever the rest of the settings.
    // This is a global setting that will override anything else. Useful when testing MRBS.
    $mail_settings['disabled'] = FALSE;


    i dont understand much about smtp or sendmail
    so i try to use simple php mail function

    thank you sir

     
  • Campbell Morrison

    I see you have already got debug turned on. Are you getting any messages in your browser window when you make a booking, for example?

    Campbell

     
  • Anonymous

    Anonymous - 2013-03-19

    no message in chrome, ff,ie,opera
    but all going good
    user can book, edit or delete
    admin can approve, edit or delete

    i am using db authen

    /******
    * Site identification information
    ******/
    $mrbs_admin = "adzpire";
    $mrbs_admin_email = "abdulaziz-d@bunga.pn.psu.ac.th";

    ...
    /********
    * Authentication settings - read AUTHENTICATION
    ********/

    $auth["session"] = "php"; // How to get and keep the user ID. One of
    // "http" "php" "cookie" "ip" "host" "nt" "omni"
    // "remote_user"

    $auth["type"] = "db"; // How to validate the user/password. One of "none"
    // "config" "db" "db_ext" "pop3" "imap" "ldap" "nis"
    // "nw" "ext".

     
  • Campbell Morrison

    The fact that you are getting no debug messages in the browser indicates that MRBS isn't even trying to send a mail, so it hasn't even got as far as trying to invoke PHP mail.

    I'll have a think as to why this might be happening. In the meantime can you confirm that it really is that config file that it is using??!

    Campbell

     
  • Anonymous

    Anonymous - 2013-03-19

    this is my web
    http://www.comm-sci1.pn.psu.ac.th/mrbs/web/index.php

    i think my config.inc.php is using because
    my site company name has changed
    /******
    * Site identification information
    ******/
    $mrbs_admin = "adzpire";
    $mrbs_admin_email = "abdulaziz-d@bunga.pn.psu.ac.th";
    // NOTE: there are more email addresses in $mail_settings below. You can also give
    // email addresses in the format 'Full Name

    ', for example:
    // $mrbs_admin_email = 'Booking System admin_email@your.org';
    // if the name section has any "peculiar" characters in it, you will need
    // to put the name in double quotes, e.g.:
    // $mrbs_admin_email = '"Bloggs, Joe" admin_email@your.org';

    // The company name is mandatory. It is used in the header and also for email notifications.
    // The company logo, additional information and URL are all optional.

    $mrbs_company = "คณะวิทยาการสื่อสาร"; // This line must always be uncommented ($mrbs_company is used in various places)

    // Uncomment this next line to use a logo instead of text for your organisation in the header
    //$mrbs_company_logo = "your_logo.gif"; // name of your logo file. This example assumes it is in the MRBS directory

    // Uncomment this next line for supplementary information after your company name or logo
    $mrbs_company_more_info = "มอ. ปัตตานี"; // e.g. "XYZ Department"

    // Uncomment this next line to have a link to your organisation in the header
    $mrbs_company_url = "http://www.comm-sci1.pn.psu.ac.th";

    // This is to fix URL problems when using a proxy in the environment.
    // If links inside MRBS appear broken, then specify here the URL of
    // your MRBS root directory, as seen by the users. For example:
    // $url_base = "http://webtools.uab.ericsson.se/oam";
    // It is also recommended that you set this if you intend to use email
    // notifications, to ensure that the correct URL is displayed in the
    // notification.
    $url_base = "";

    i did not change anything in areadefaults and systemdefaults

    thank you