Results 1 to 5 of 5

Thread: Where are USER SMTP PORT settings stored (what table?)

  1. #1
    tj@estreet.com is offline Sugar Community Member
    Join Date
    Feb 2006
    Posts
    163

    Default Where are USER SMTP PORT settings stored (what table?)

    Hey all,

    Need to change SMTP Port for ALL Users, but having a time finding the table in which they are stored.
    Does anyone know this? Are they encoded in users.user_preferences?
    Thanks

  2. #2
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Where are USER SMTP PORT settings stored (what table?)

    tj@estreet.com,

    It looks like it's in the content column of user_preferences.

    select * from user_preferences
    where category = 'global'

    Since it's all scrambled it may be easiest to write a php script where you select all your users and update their preferences one-by-one.
    PHP Code:
    $results $this->db->query('SELECT id FROM users WHERE deleted = 0');;
    while(
    $row $this->db->fetchByAssoc($results )) {
       
    $focus = new User();
       
    $focus->retrieve($row['id']);
       
    $focus->setPreference('mail_smtpport','25'0'global'$focus);


  3. #3
    tj@estreet.com is offline Sugar Community Member
    Join Date
    Feb 2006
    Posts
    163

    Default Re: Where are USER SMTP PORT settings stored (what table?)

    Thanks eggsurplus,

    That worked -- sort of. Just can't get a connection on new port (port25 now blocked by access provider - comcast!
    Still not clear on the parameters "setPreference('mail_smtpport','25', 0, 'global', $focus); " in the script you offered,
    nor how you found it but should anyone be interested the following incarnation of the script also unexpectedly alters
    mail_smtpserver,
    mail_fromaddress, and
    mail_smtp_fromname
    WHEN inserted into Users/EditView.php after

    "global $mod_strings;
    $admin = new Administration();
    $admin->retrieveSettings();
    $focus = new User();
    PHP Code:
    $result mysql_query('SELECT id FROM users WHERE deleted = 0');
       while (
    $row mysql_fetch_assoc($result)) { 
       
    $focus->retrieve($row['id']); 
       
    $focus->setPreference('mail_smtpport','port'0'global'$focus); 

    Still, manually resetting server, fromaaddress and fromname I have yet to succeed in getting a connection to our mailserver, returning send errors with the following in php_error.log

    [21-Jun-2007 08:06:53] PHP Warning: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]:
    unable to connect to relay.estreet.comort
    (
    A connection attempt failed because the connected party did not properly respond after a period of time,
    or established connection failed because connected host has failed to respond.
    )
    in C:\AreaPro\wamp\www\crm\include\phpmailer\class.sm tp.php on line 105
    As if it weren't difficult enough getting Sugar Mail et.al. whipped into some usable configuration, now
    with port 25 newly blocked by comcast and failing attempts to reset the port, I'm wondering if we might not
    be better served setting up for sendmail instead?? Can this be done on a wamp stack?
    Last edited by tj@estreet.com; 2007-06-21 at 11:16 PM.

  4. #4
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Where are USER SMTP PORT settings stored (what table?)

    It absolutely will change the other fields if you insert it into an exsiting Sugar file like EditView.php. The script example I provided was intended to be used in a fresh script that you can either run from a command-line or from hitting a stand-alone page in your browser.

    Sucks that comcast is blocking that port. If this is for your company's ISP you should be able to get it unblocked. Sendmail is very doable but we just had to switch from sendmail to SMTP due to some issues with external spam filters blocking our emails on the recipient side.

  5. #5
    tj@estreet.com is offline Sugar Community Member
    Join Date
    Feb 2006
    Posts
    163

    Default Re: Where are USER SMTP PORT settings stored (what table?)

    Sorry to hear your need to switch to SMTP.

    While thought of switching to sendmail sends shivers up MY spine
    (looked into it briefly on our first go round with Sugar Mail 8 -9 months back)
    I was considering it -- just the same.
    Damned pesky spam filters!

    Unblocking is apparently a non-starter with comacst (corporate thugs!)
    which leaves us trying to get Sugar Mail to accept port .
    Does anyone have any experience with this? Are our efforts in vain?

    By the way, I have mentioned in other threads, but on the subject of spam filters in this context
    I thought a word of caution might be worth mentioning again.
    Be wary of campaining to all AOL addresses as their SpamCop can cause you BIG TROUBLES
    When AOL users report spam via SpamCop , AOL blocks mail from your mail server...
    and for ALL domains (hundreds of domains) on that mail server from sending mail to AOL.
    Last edited by tj@estreet.com; 2007-06-21 at 11:18 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. problemi step 6 di SugarSuite-Full-4.0.1h
    By lucia in forum Italiano
    Replies: 0
    Last Post: 2006-12-27, 08:50 AM
  2. 4.0.1 Installation Problem
    By clawton in forum Help
    Replies: 14
    Last Post: 2006-02-13, 04:17 PM
  3. Fatal error: Max
    By spokes2k4 in forum Help
    Replies: 3
    Last Post: 2006-01-15, 03:50 PM
  4. php 5.0.4 + MySQL 5.0.9
    By sergiogu in forum Help
    Replies: 0
    Last Post: 2005-08-30, 04:38 PM
  5. Empty config.php at the end of install
    By aemadrid in forum Help
    Replies: 2
    Last Post: 2005-08-01, 06:29 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •